Score:0

count files and folders with diff and dolphin

de flag

I used rsync to make a backup of home folder excluding .* folders

rsync -avz --exclude '.*' /home/andrea/ /media/andrea/maxtor-Est1000/

I checked with dolphin and diff to see if everything from the home to the external disk had been copied and the data is conflicting.

According to dolphin the source home folder has more files and folders than the backup on the external drive, according to diff everything is fine, the folders are identical.

It is clear that in checking the count on the home I excluded the .* folders and files

Now I wonder, who should I trust? Should I trust diff or dolphin?

Thanks

Marco avatar
br flag
Why not trust `rsync` ? Depending on the option you use with `rsync` you can run `rsync` over and over again till there is no change anymore. Can you add the exact rsync command in the question?
guiverc avatar
cn flag
You excluded directories/files, and then wonder why the destination has fewer directories/files?? As we don't know, and can't see what is on your system, how are we to know? Your explanation explains your result as I see it.
canerandagio avatar
de flag
@Marco This is my first time using rsync, and I wanted to check if everything went well
canerandagio avatar
de flag
@guiverc it is clear that I have excluded those files and folders from the count, however I have now specified it
Marco avatar
br flag
I would use `--exclude '.??*'` to make sure it does not exclude "." and "..". But I guess, rsync is clever enough.
Marco avatar
br flag
Besides this, it depends on the filesystem. At least the metadata (permissions, user, xattr) could be different. e.g. copy from ext4 to vfat will remove nearly all metadata. To be sure to have the metadata correct, better use `tar` with the right options.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.