I have a problem where tar is somehow creating duplicate filenames when tarring a directory. Doing an ls on the directory does not show any duplicate filenames, yet when the directory is tarred, you can see that there are duplicates:
There are no hard links, at least not for this specific file
-rw-r--r-- 1 root other 13331 Mar 14 09:57 /var/log/cricket/cricket24b.10
The link count=1
Are you really suie we are dealing with duplicate file names?
It could be that 1 file actually has the name as you see it. The other one could contain non printable characters in its name, which makes it look as if the file has the same name.
You could try the command:
and see if it looks like duplicate names pop up.
If this is the case you can try the command:
which should show the file names actually differ.
This is all assuming the time stamps of the files haven't changed.
I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it.
Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem?
tar tvf file1.tar
... (1 Reply)
Hi,
In a file, I have to mark duplicate records as 'D' and the latest record alone as 'C'.
In the below file, I have to identify if duplicate records are there or not based on Man_ID, Man_DT, Ship_ID and I have to mark the record with latest Ship_DT as "C" and other as "D" (I have to create... (7 Replies)
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Hi
I would like to use tar cmd in my script.
I have a variable with filenames, e.g. 1000 records and I would like to paste its values into tar cmd.
For this example I used three elements variable strings.
strings="file1.txt file2.txt file3.txt"
`tar cf file1.tar $strings`
Whether... (1 Reply)
Hi there, i have been working on a backup script and have it just about working, the only problem im left with is that my filenames for my backups are all the same are replacing one another when backing up.
currently i have
BACKUP_FILE=backup_$(date +%d%m%y).tgz
but would like something like... (2 Replies)
Hello Gurus,
O/S RHEL4
I have a requirement to compare two linux based directories for duplicate filenames and remove them. These directories are close to 2 TB each. I have tried running a:
Prompt>diff -r data1/ data2/
I have tried this as well:
jason@jason-desktop:~$ cat script.sh ... (7 Replies)
Hi Gurus,
Do any kind souls encounter have the same script as mentioned here.
Find and compare filenames in different mount point and remove duplicates.
Thanks a million!!!
wanna13e (7 Replies)
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Hi,
On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files.
a) /usr/users/oracle/bin
b) /usr/users/oracle... (1 Reply)
Hi All
Can someone pls guide me if there any utility to compress file on windows & uncompress on vxworks
I tried as -
- compressed some folders on windows ... i created .tar ( to maintain directory structure ) and compressed to .gz format.
- on VxWorks i have uncompressed it to .tar... (1 Reply)