LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-03-2005, 05:55 PM   #1
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 264
Blog Entries: 2

Rep: Reputation: 34
tar and hidden files


As a test I:
cd testdir
touch .hidden
cd ../
tar -cvf test.tar testdir
I then tar -tf test.tar and the file .hidden is in there

I then backed up my home directory from /home:
tar -cvf homebu-04.20.205.tar /myhomedir
I watched and it looked like it was getting all the .hidden files.

I deleted my home directory and created /home on a different partition.
I then did a tar -xvf homebu-04.20.205.tar to my new home directory.
All my hidden files are missing!!!

2 questions.... Near as I can tell, tar did backup the hidden files.... Am I doing something wrong in the extraction? Or did I just fubar the tarball during the backup.

The tarball is about 9Gig long. (video editing) Could that have something to do with the problem?

TIA

-J
 
Old 04-03-2005, 07:23 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
I performed a similar test, tarring and then untarring a directory that contained some PNGs and a couple hidden files. They were extracted successfully. I then created a hidden directory with files in it.

Perhaps as a check, see if the .kde directory exists in your new homepage. 'ls -lad .kde/'
If not, try extracting just the .kde directory:
tar xvf homebu-04.20.205.tar myhomedir/.kde

Note that you need to include the full path for the .kde directory. Since you tarred the entire myhomedir directory, that is where the filename starts.

Also use the 't' command to list the contents of the tarred file. You might want to redirect the output to a file or the less command. Are the hidden files and directories in the listing?

For comparison, my version of tar is:
tar (GNU tar) 1.14

Last edited by jschiwal; 04-03-2005 at 07:25 PM.
 
Old 04-03-2005, 11:33 PM   #3
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 264

Original Poster
Blog Entries: 2

Rep: Reputation: 34
I ran tar -xvf homebu-04.20.205.tar,

It seems that what is missing is most of my hidden directories, specifically:
/home/myhomedir/.gnupg
/home/myhomedir/.mozilla
/home/myhomedir/.kde <<<---- missing in tarball
/home/myhomedir/.local ...etc

It looks like everything hidden right under myhomedir/ that had a dot in front of it is missing. However interestingly enough everything the level down in the branch got backed up and restored successfully, i.e.

/home/myhomedir/Mail/.foo.com.directory
/home/myhomedir/Mail/.foo.com.index
/home/myhomedir/Mail/.index.index

The above results are from a full restore of the tarball.... unless there are hidden files in the tarball.

Almost forgot:

tar --version
tar (GNU tar) 1.15.1

-J

Last edited by jjthomas; 04-03-2005 at 11:34 PM.
 
Old 04-07-2005, 11:36 AM   #4
fara78
LQ Newbie
 
Registered: Apr 2005
Posts: 21

Rep: Reputation: 15
Tar and hidden files

Hi

I've tried to do :

tar -Pcf myhome.tar /home/myhome/*

after checking myhome.tar by

tar -tf myhome.tar

I found that all my hidden files are ignored.
Then I tried it again this way:

tar -Pcf myhome.tar /home/myhome

and the result was excellent, all my hidden files and directories were tarred in my tar file.
I don't know if you've used the wildcard "*" (star) but in my case it WAS the problem.

my tar version is:

tar (GNU tar) 1.13.25

-Cheers
Faramarz Salehpour
 
Old 04-07-2005, 08:37 PM   #5
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 264

Original Poster
Blog Entries: 2

Rep: Reputation: 34
I know I did not tar with the -P switch.

As I recall I cd /home and typed:

tar -cvf homebu-04.20.205.tar /myhomedir

I did no use the * Once get everything moved over to the new installation I will check this further.

-J
 
  


Reply


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
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 11:02 AM
Hidden Files coold8 Linux - General 5 04-27-2005 11:26 PM
hidden files Jeebizz Slackware 4 04-22-2005 07:18 PM
home directory files gone, hidden files remain Grasshopper Linux - Security 12 04-10-2005 08:23 PM
Hidden Files Alien18 Linux - Newbie 4 08-12-2004 09:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:58 PM.

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