# 解包 $ tar xvf example.tar zip # 壓縮 $ zip example.zip example # 解壓縮 $ unzip example.zip gz # 壓縮 $ gzip example # 解壓縮 $ gzip -d example.gz bz2 # 壓縮 $ bzip2 -z example # 解壓縮 $ bzip2 -d example.bz2 xz # 壓縮 $ xz -z example # 解壓縮 $ … To create a gzipped package.tgz file in your “home/john” directory, just type in the following command: $ tar cvzf home/john. The syntax to create a tarball is: $ tar cvzf name_of_ dirname/. You can create a compressed tar file just by including the letter “z” in “cvf”. Tar Command in Linux (Create and Extract Archives) To create a TAR directory: tar -cvf archivename.tar directory_path. Now, to compress files or directories using tar, you can simply use the following commands. ![]() How to Compress and Extract Files Using the tar … tar.gz File on Linux Ģ1 Useful Tar Command Examples for Every Linux Sysadmin Linux tar -c命令 How to Extract Files From a. However it is only removing the individual files inside the directory and not the directory itself (which is what I specified in the command). I'm trying to tar a collection of files in a directory called 'my_directory' and remove the originals by using the command: tar -cvf files.tar my_directory -remove-files. Despite the nostalgic origin of the name, … ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |