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.

  • 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 Aug 9 '15 at 11:07
  • @Botmaster What? – user3728501 Aug 9 '15 at 11:11
  • use cp and rename all files then u copy them to NTFS. is it good for u? – Botmaster Aug 9 '15 at 11:33
  • 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 Aug 9 '15 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.