Carbon Copy Cloner Question

heisenberg123

macrumors 603
Original poster
Oct 31, 2010
6,497
9
Hamilton, Ontario
long story short I have an external drive with video files on it I used CCC to put those files on the drive

I plugged that drive into an Android tv box when I got to play a file on the Android box it lists all the files twice one file is playable and the other is only a few kbs it has a underscore in front of the file name is not playable

This "other" copy of the file is hidden on my Mac

Does CCC create these hidden files?

Can they be removed so the media player does not see them?

Will removing the mess up how CCC will see that drive the next time I clone files to it?

Is there a setting in CCC to prevent these hidden files from being created?
 

MacUser2525

macrumors 68020
Mar 17, 2007
2,040
326
Canada
I would think the answer to all is yes CCC did put them there no clue on setting to eliminate. By default OSX will not show hidden files Linux which Android is a subset of will show them files. Now an easy solution to your problem here would be to use the built-in rsync of OSX like CCC does to keep the files synced up. If you do not want to use the command line then there are different programs like DropSync that will do the rsync graphically for you. Or you could use the CCC run a shell script after completion of a sync feature to have it delete the hidden files.
 

MacUser2525

macrumors 68020
Mar 17, 2007
2,040
326
Canada
Something like below in a Terminal window would do, you would want to be sure not to be deleting the files you want to keep.

Code:
MacUser2525:~$ mkdir test
MacUser2525:~$ cd test
MacUser2525:~/test$ touch _1.txt
MacUser2525:~/test$ touch _2.txt
MacUser2525:~/test$ ls -l
total 0
-rw-r--r--  1 MacUser2525  admin  0B  8 Oct 16:29 _1.txt
-rw-r--r--  1 MacUser2525  admin  0B  8 Oct 16:29 _2.txt
MacUser2525:~/test$ find . *_
.
./_1.txt
./_2.txt
find: *_: No such file or directory
MacUser2525:~/test$ find . *_ | xargs rm *
find: *_: No such file or directory
rm: "." and ".." may not be removed
rm: ./_1.txt: No such file or directory
rm: ./_2.txt: No such file or directory
MacUser2525:~/test$ ls -l
Or now I think about it little more after that quick down and dirty test above. Use rsync itself as the _ files should not be present on the source, so something like this.

Code:
rsync -avP --delete --dry-run /path/to/source/directory/* /path/to/destination/directory/
This command will use rsync to archive the files on the source to the destination directory verbosely ie. you will see what it is going to do the P will allow you to resume a control + c key aborted transfer where it left off, deleting any files on the destination that are not present on the source ie. the _ ones, with only showing you what it will do you would need to remove the --dry-run part in there to actually do the command.
 
  • Like
Reactions: jimthing

Weaselboy

Moderator
Staff member
Jan 23, 2005
30,621
10,415
California
long story short I have an external drive with video files on it I used CCC to put those files on the drive

I plugged that drive into an Android tv box when I got to play a file on the Android box it lists all the files twice one file is playable and the other is only a few kbs it has a underscore in front of the file name is not playable

This "other" copy of the file is hidden on my Mac

Does CCC create these hidden files?

Can they be removed so the media player does not see them?

Will removing the mess up how CCC will see that drive the next time I clone files to it?

Is there a setting in CCC to prevent these hidden files from being created?
It is not CCC, but rather OS X creating those files. When you copy files from a HFS+ OS X volume to a non-HFS+ volume like you are doing it creates those ._ files to contain the meta data (resource forks etc) that are normally contained in the file itself on HFS+.

There are third party apps like Blue Harvest that will remove these for you. Or you can use the built in Terminal command dot_clean to do the same thing.

Code:
dot_clean PATH_OF_FOLDER_OR_DRIVE
Thing is next time you move files to that drive with CCC, it will put them back. CCC has an option to run a script after the copy/clone. I think once you nail down the dot_clean command you could have CCC auto run that for your against the external after the copy each time. That would automate it for you.
 

MacUser2525

macrumors 68020
Mar 17, 2007
2,040
326
Canada
Couldn't one just reformat the external drive as HFS+ to solve this going forward?
(After saving, and cleaning-up, the current files off the drive first, of course.)
Depends on whether the Android stick will accept the HFS+ formatted drive I would think most likely not.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.