|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
diff? cmp?
|
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
Quote:
Okay, but diff should work fine. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > comparing tar output to directory list files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|