Bash tricks

Written By smart| 16 June 2009| No Comment

Trick 1:

Takes you back to the previous directory

“cd -”

Trick 3:

Recursively delete all .csv files in the folder.

“find . -name .csv -print0 | xargs -0 rm -rf”

Trick 3 :

Creating multiple directories and sub directories with one command

mkdir -p dir{1,2}/subd{1,2} Create dir1/subd1 dir1/subd2 dir2/subd1 dir2/subd2

Trick 4:

If you want to copy a file into file.bak

cp file{,.bak}

Related Posts with Thumbnails

Share With Others

Leave your response!




Comment moderation is enabled. Your comment may take some time to appear.