File count incorrect

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

File count incorrect

Postby pk_fox » Fri Apr 25, 2014 8:35 am

Hi all, I just rsynced two folders on two different drives and all appeared to be fine ( no error messages ) , I then did a file count on both using this method

Code: Select all
find /folder1 -name *.flac|wc -l
find /folder2 -name *.flac|wc -l


This returned 5240 on folder1 and 5239 on folder2, how can I identify the missing file ?

Edit

I just ran rsync again and received an error "file has vanished" followed by the path to the file, I checked and the file is indeed in folder1 but not in folder2, the file looks to be OK but it does have a very long path and some unusual characters in its name e.g [ and _ , could this cause the problem ?
More output from rsync
Code: Select all
Total size is 148046291131  speedup is 507820.01
rsync warning: some files vanished before they could be transferred (code 24) at main.c(1070) [sender=3.0.9]
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby nelz » Fri Apr 25, 2014 9:14 am

Code: Select all
find /folder1 -name *.flac | sort >folder1.list
find /folder2 -name *.flac | sort >folder2.list
diff folder[12].list


The shell "special characters" like [ may be causing problems for rsync. What is the rsync command you are using?
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8497
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby pk_fox » Fri Apr 25, 2014 9:48 am

nelz wrote:
Code: Select all
find /folder1 -name *.flac | sort >folder1.list
find /folder2 -name *.flac | sort >folder2.list
diff folder[12].list


The shell "special characters" like [ may be causing problems for rsync. What is the rsync command you are using?


Code: Select all
rsync -av /mnt/folder1 /mnt/folder2


Folder names are fictitious but folder1 is a Linux Nas box and folder2 a USB drive , I renamed the rogue file and all is OK so it must have been those characters, but I've notice some other files have these and they copied OK, maybe it was a combination of the length and the special characters ? Any ideas on my other question why my USB drive wasn't mountable ? - bloody weird one that !
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby nelz » Fri Apr 25, 2014 9:50 am

It is more likely to be the particular combination of special characters.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8497
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK


Return to Help!

Who is online

Users browsing this forum: Google [Bot] and 0 guests