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:
Should do exactly the same - compress every file in the current directory. You can even use it recursively:
gzip -r .
There are 6 alternatives - vote for the best!
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.
If you can do better, submit your command here.
You must be signed in to comment.