Red Bridge Internet is a San Francisco WordPress Consulting firm specializing in WordPress websites and WordPress Plugin Development. We're the ones you have been searching for.

Exclude Directory from Tar

Very simple, but I always seem to forget the format:

tar -cvvf name.tar dir/ --exclude dir_to_exclude directory

You actually need to use the full path and sometimes swap the order:

tar -cvf name.tar --exclude "/full/path/dir/exclude_this"  /full/path/dir/

Here’s a couple more tar commands for good measure:

tar -cvvf file.tar file.txt (tar file)
tar -cvvf file.tar home/ (tar dir)
tar -xvvf file.tar (untar)
tar -xvf  file.tar (view)
tar -cvvf archives/20040918.tar *php *txt (example)

Incoming search terms:

  • tar exclude directory
  • tar exclude example
  • tar exclude dir
  • tar exclude directory example
  • tar exclude directories
  • exclude directory from tar
  • tar exclude folder
  • tar exclude empty directories
  • tar exclude
  • how to exclude directory in tar

Related posts:

  1. Copy Directory with Sub Directories in Linux
  2. Multi-Level User Access With Joomla
  3. Webalizer with Virtual Hosts on Fedora Core 5
  4. Whereis ImageMagick

Leave a Reply