Thursday, August 30, 2007

Tip for the day: TAR ONLY THE FILES

To tar only files (not subdirectories) in the current directory use this command:

$ tar cvf files.tar ./`ls -l | grep -v '^d' | awk '{ print $9 }'`

1 comment:

akshat said...

Thanks, simple and effective !