About 82,400 results
Open links in new tab
  1. archive - How do I tar a directory of files and folders without ...

    tar -cvzf tarlearn.tar.gz --remove-files mytemp/* If the folder is mytemp then if you apply the above it will zip and remove all the files in the folder but leave it alone. tar -cvzf tarlearn.tar.gz --remove-files --exclude='*12_2008*' --no-recursion mytemp/* You can give exclude patterns and also specify not to look into subfolders too

  2. linux - Shell command to tar directory excluding certain …

    Jun 12, 2009 · I'd like to show another option I used to get the same result as the answers before provide, I had a similar case where I wanted to backup android studio projects all together in a tar file to upload to media fire, using the du command to find the large files, I found that I didn't need some directories like: build, linux e .dart_tools Using ...

  3. linux - what does -zxvf mean in tar -zxvf <filename ... - Stack …

    Instead of wading through the description of all the options, you can jump to 3.4.3 Short Options Cross Reference under the info tar command. x means --extract. v means --verbose. f means --file. z means --gzip. You can combine one-letter arguments together, and f takes an argument, the filename. There is something you have to watch out for:

  4. compression - Create a .tar.bz2 file Linux - Stack Overflow

    Let's say I am in the folder /home/user/folder. In the folder "folder" are several files (txt, .c etc). How do I compress that folder of type .tar.bz2 and place it in my /home directory? In the /home/user/folder, I've tried sudo tar -cvjSf folder.tar.bz2 but get an error: tar: Cowardly refusing to create an empty archive

  5. linux - Find files and tar them (with spaces) - Stack Overflow

    May 5, 2011 · Use the find command to output path to whatever files you're looking for. Redirect stdout to a filename of your choosing. Then tar with the -T option which allows it to take a list of file locations (the one you just created with find!) find . -name "*.whatever" > yourListOfFiles tar -cvf yourfile.tar -T yourListOfFiles

  6. linux - Tar a directory, but don't store full absolute paths in the ...

    Sep 8, 2013 · After creating all the paths in the example and running the command (with -cvf added after tar), I find the resulting tar.gz file does not have absolute paths inside of it, which is consistent with several other answers. If you think tar is broken or outdated on both of the systems I've used for testing, please link to some documentation that ...

  7. linux - Opening a .tar.gz file with a single command - Stack Overflow

    Files with extension tar.gz or .tgz are tar files compressed with gzip. On Unix system extract them with following command: gunzip < file.tar.gz | tar xvf - gunzip < file.tgz | tar xvf - If you have GNU tar (Linux system) you can use the z option directly: tar xvzf file.tar.gz tar xvzf file.tgz To read more, see Linux / UNIX command to open .gz ...

  8. linux - tar: add all files and directories in current directory ...

    The {} in the command means file list goes here and \+ means that the command will be run as: tar zcvf workspace.tar.gz .file1 .file2 .dir3 instead of. tar zcvf workspace.tar.gz .file1 tar zcvf workspace.tar.gz .file2 tar zcvf workspace.tar.gz .dir3

  9. tar with --include pattern - Stack Overflow

    Oct 1, 2014 · Actually I just looked into tar(1) on my freebsd system and I found an --include option (earlier I had looked on some old man page online). The --include options is quite powerful. Here are some examples. These are the files. cnicutar@uranus ~/tar_test $ ls -1 a.c b.c x Simple tar, archive everything

  10. linux - how to prevent overwrite existing files when using tar …

    Jul 4, 2018 · I made a mistake that forgot to assign argument of the file name when using tar command like below: [john@foobar foo]$ ll total 0 -rw-rw-r-- 1 john john 0 7月 4 19:20 2018 file1 -rw-rw-r-- 1 john...

Refresh