To zip a single file a in linux
AnnouncementI have released my new course on Udemy, Kubernetes By Example. Sign up now to get free lifetime access!
To unzip a single file in linux
To compress a directory the command is
tar -cf filename.tar filename
filename.tar will be the new name of zipped file for filename.
-cf means creat a file
When compressing a directory it is important not to be in the directory. The command will not work otherwise.
To extract the filename.tar file the command is
tar -xf goat.tar
-xf means extracting a file.