Saturday, January 29, 2011

BASH : Shell Expansions

rm -rf * - >remove all files
touch test{1,2,3} -> create 3 files
touch test{1,2,3}file -> create 3 files:test1file,...
mkdir test{1,2,3} -> create 3 directory having drwx-xr-x
mkdir test{1,2,3}{5,6,7} -> create 3*3 directorys like test15, test16, test17, test25....
rm -rf files{1,2,3}{5,6,7}
cd /
touch /root/temp/file{1,2,3}
mkdir /root/temp/folder{1,2,3}extension
touch ~/folder1/file{1,2,3}
rm -rf ~/folder1/file{1,2,3}

No comments:

Post a Comment