Sunday, June 3, 2012

Use ! to invoke previous command

The output of the history command will be

1.cd ~

2.pwd


etc etc.


to invoke a previously typed command without typing the full command just type

!2



pwd command will be executed

Use Grep -i for case insensitive search

For example

use

ps -e | grep -i FireFOx

rather than 



ps -e | grep firefox

Friday, June 1, 2012

Stat command to know everything about a file

Simple syntax


stat filename


and it shows you all

Awesome Hindi Linux Tutorials

Check it out

http://www.youtube.com/user/KamranAtWBITT/videos

Just some useful navigating command

echo $PWD shows the current directory


echo $OLDPWD shows the most recently visited directory


cd - takes you to the last directory that you were.

in any directory (.) refers to the current directory and (..) refers to the parent direstory



thus cd . let's you remain in the current directory


cd .. takes you to the parent directory