I often need to compress archives in Linux. is there a simpler way instead of always building such complicated commands?
tar zcvf /tmp/mybackup.tar.gz /home/important
I often need to compress archives in Linux. is there a simpler way instead of always building such complicated commands?
tar zcvf /tmp/mybackup.tar.gz /home/important
An alias would mean you don't have to remember the
zcvf
options. You can name the alias whatever you want as long as it is one word.Create the alias in your terminal with
and then your command becomes
If you like this alias, make it permanent by adding it to your
~/.bashrc
. (Or whatever config file is sourced by the shell you are using.) Then every new terminal you open will have the alias already configured and ready to use.