Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 28th, 2003, 03:19 PM
sam_rich sam_rich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Texas
Posts: 82 sam_rich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 40 m 34 sec
Reputation Power: 6
comparing tar output to directory list files

We have a script that executes the line below:

find . -name '*' -print > datalisttmp.txt

this creates a directory listing of a selected folder in a text file. We then remove the './' from the beginning of each line with the following:

cut -c 3- datalisttmp > datalist2.txt

this creates the same directory listing but with out the leading './'. We then have a tar command that backs up the selected directory and pipes the verbos data to a file:

tar czvf /backup.tar /selectedfile > /datalisttar.txt

How do you compare the 'datalist2.txt' file to the 'datalisttar.txt' file to find out what is different, ie: not found in the tar?

Reply With Quote
  #2  
Old March 28th, 2003, 04:15 PM
Strike Strike is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 383 Strike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 7
Send a message via ICQ to Strike Send a message via AIM to Strike Send a message via Yahoo to Strike
diff? cmp?
__________________
Debian - because life's too short for worrying.
Best. (Python.) IRC bot. ever.

Reply With Quote
  #3  
Old March 28th, 2003, 04:35 PM
sam_rich sam_rich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Texas
Posts: 82 sam_rich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 40 m 34 sec
Reputation Power: 6
I don't think that cmp is the right answer in this case. We are trying to compare two text files to find out what files were not backed up in the tar file.

Reply With Quote
  #4  
Old March 28th, 2003, 05:23 PM
Strike Strike is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 383 Strike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 7
Send a message via ICQ to Strike Send a message via AIM to Strike Send a message via Yahoo to Strike
Quote:
Originally posted by sam_rich
I don't think that cmp is the right answer in this case. We are trying to compare two text files to find out what files were not backed up in the tar file.

Okay, but diff should work fine.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > comparing tar output to directory list files


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway