commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Compresses each file individually, creating a $fileneame.tar.gz and removes the uncompressed version, usefull if you have lots of files and don't want 1 huge archive containing them all. you could replace ls with ls *.pdf to just perform the action on pdfs for example.
There are 3 alternatives - vote for the best!
Should do exactly the same - compress every file in the current directory. You can even use it recursively:
gzip -r .
If you can do better, submit your command here.
You must be signed in to comment.