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

    I typically do: tar -czvf my_directory.tar.gz my_directory What if I just want to include everything (including any hidden system files) in my_directory, but not the directory itself? I don't want:

  2. bash - Listing the content of a tar file or a directory only down to ...

    I wonder how to list the content of a tar file only down to some level? I understand tar tvf mytar.tar will list all files, but sometimes I would like to only see directories down to some level.

  3. linux - How do I tar a directory without retaining the directory ...

    tar -czf destination.tar.gz -C source/directory $(ls source/directory) This solution: Includes all files and folders in the directory Does not include any of the directory structure (or .) in the final product Does …

  4. linux - How to tar a set of files? - Stack Overflow

    Mar 4, 2013 · 36 To simply create a tarball of these files I would just do: tar cf ones.tar 1_*.txt tar cf twos.tar 2_*.txt Most likely you want to compress the tarballs, so use the z option: tar czf ones.tar.gz …

  5. Tar archiving that takes input from a list of files

    The tar man page is extremely unhelpful for this option (at least on RedHat 5.4 thru 6.3): "-T: get names to extract or create from file F". "Extract or create" sounds like it applies to taking files out of the tar …

  6. How to tar certain file types in all subdirectories?

    Sep 11, 2013 · 122 I want to tar and all .php and .html files in a directory and its subdirectories. If I use tar -cf my_archive * it tars all the files, which I don't want. If I use tar -cf my_archive *.php *.html it …

  7. How can I build a tar from stdin? - Stack Overflow

    Apr 8, 2010 · Something like: tar cfz foo.tgz --files-from=- But keep in mind that this won't work for all possible filenames; you should consider the --null option and feed tar from find -print0. (The xargs …

  8. Tar a directory, but don't store full absolute paths in the archive

    Sep 8, 2013 · There are already many questions about tar and backuping in stackoverflow and at other places on the web, but most of them ask for dropping the entire sub-directory structure (flattening), or …

  9. linux - Shell 'tar: not found in archive' error when using regular ...

    Jun 5, 2013 · Sometimes, you want to extract files with the * in the name. For example: tar -xf abc.tar.gz 'src/prog/*name.*' would extract files such as src/prog/bigname.c, src/prog/smallname.h; the single …

  10. How do I extract a tar file in Java? - Stack Overflow

    Nov 24, 2008 · I haven't used a tar API directly, but tar and bzip2 are implemented in Ant; you could borrow their implementation, or possibly use Ant to do what you need. Gzip is part of Java SE (and …