Linux cp command: Auto-rename files, windows-like, FAT32, file name restrictions, ignore symbolic links

0

Linux cp command: How can I auto-rename all files to conform to windows or FAT32 formatted device file name restrictions, and ignore all symbolic links?

I am trying to copy the contents of my dropbox directory on a ext4 formatted linux system to a FAT32 formatted memory stick. My dropbox folder contains a lot of random files which cannot be copied to a FAT32 device because the filenames contain characters not allowed on this filesystem. In addition, it contains many symbolic links which I would like to just ignore. (Don't copy or follow any symbolic links.)

Is it possible to acomplish these 2 things with the linux cp command, and if so how do I do it?

Obviously, I could tarball everything, but then I won't be able to quickly open it again.

I tried google searching, but didn't hit any relevant results.

user3728501

Posted 2015-08-09T11:01:04.973

Reputation: 1 090

so if only a command renames all file names for you which later you can copy them to NTFS is good enough for you? – Botmaster – 2015-08-09T11:07:28.573

@Botmaster What? – user3728501 – 2015-08-09T11:11:03.387

use cp and rename all files then u copy them to NTFS. is it good for u? – Botmaster – 2015-08-09T11:33:27.093

Yes, if possible I would like to use cp to automate the process for me. No I do not want to copy to an NTFS device. – user3728501 – 2015-08-09T11:39:33.733

No answers