The Danesh Project

Knowledge bling’s the finer things in life.

How To Execute Linux commands from Windows

Most of the time, users are having a Windows Machine on their desk or laptop. Normally, we want to perform a full scale data retrieval from our Linux servers in the DC, where we don’t have a trusted Linux server to manage it….the answer to it is use “PLINK” utility.
Plink comes together with the Putty…
A [...]

Here’s a quick walk through to synchronize your system time through NTP.
Install the NTP package if you don’t already have it installed.
[root@abubu]# yum install ntp
Check your date.
[root@abubu]# date
Thu Jul 24 13:34:24 MYT 2008
Use the ntpdate command to poll from public NTP servers. I this example I’ll use ntp servers provided by the NTP POOL Project. [...]

Here’s an easy way to get the pid of a running process.
Running the “pidof” command will return the pid(s) for a running program. See sample below,
danny@pandora:~> pidof syslog-ng
2043
danny@pandora:~> pidof acpid
2045
danny@pandora:~> pidof /usr/bin/firefox
14408
danny@pandora:~> pidof /usr/bin/compiz
27164
danny@pandora:~> pidof /bin/bash
27011 17339 16792 16477 15151 14403
Simple right!?

Here’s a quick way to access your environment variables from the CLI.
User the “%” key in conjunction with your “<tab>” key to auto complete your environment variables.
pandora:/ # echo $J <TAB>
$JAVA_BINDIR  $JAVA_HOME    $JAVA_ROOT    $JDK_HOME     $JRE_HOME
pandora:/ # echo $JAVA_ <TAB>
$JAVA_BINDIR  $JAVA_HOME    $JAVA_ROOT
pandora:/ # echo $JAVA_HOME
/usr/lib/jvm/java
The traditional way is to “env | grep [variable name]“

How to reload your bashrc file

Here’s a quick way to reload your bachrc file without having to invoke a new shell.
[root@bambee]# source ~/.bashrc
or
[root@bambee]# . ~/.bashrc

« Previous Entries