Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-22-2008, 10:00 AM   #1
Senior Member
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Excluding Hidden Files / Folders in Tarball

I swear I found this before but can't know for some reason. I want to create a tarball of my entire home directory but want to exclude all hidden files and folders. I just want the personal data - not any system stuff.

I can't recall what the command would appear as and if anyone can assist me:

tar cvjf /media/usb_drive/carlwill_home_dir.tar.bz2 /home/carlwill

I assume there needs to be an "exclude" tag in there but don't know how to properly format this...

Thanks for any help!
Old 05-22-2008, 10:20 AM   #2
Senior Member
Registered: Oct 2003
Posts: 2,844

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
Try this:

tar cvjf /media/usb_drive/carlwill_home_dir.tar.bz2 /home/carlwill --exclude .*

Every hidden file should have a "." at the beginning of its name.
1 members found this post helpful.
Old 05-22-2008, 10:23 AM   #3
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
man tar
search for 'exclude'

tar --exclude=".*" -cvjf /media/usb_drive/carlwill_home_dir.tar.bz2 /home/carlwill/


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I copy hidden home directory configuration files and folders? rm_-rf_windows Linux - General 3 06-29-2007 05:26 AM
Excluding Folders with CP Luke_C Linux - General 17 07-27-2006 04:22 AM
Excluding specific folders from backup karloslambchop Ubuntu 7 07-21-2006 08:10 PM
excluding hidden directories when using tar djgerbavore Slackware 3 01-05-2006 03:49 PM
Show hidden files and folders in Mac OS X Akiva Other *NIX 2 07-22-2005 10:54 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration