Wednesday, April 18, 2012

LINUX COMMANDS

$ sudo !!                     :Run the last command as root
cp filename{,.bak}    :Quickly backup or copy a file
echo $PATH                :displays current environment path
PATH=$PATH:dir        :add a path to environment variable

if there is a typing mistake in the previous command
eg: ehco instead of echo then type
    $^ehco^echo
it corrects the command in previous line and executes

save the bash history
$export HISTFILE=/home/.../todays_history

No comments:

Post a Comment