[opensuse] sanitising file names for fat32
Before making a backup of a drive to a fat32 external usb drive, i would like to rename all files containing special characters not permitted on fat32 partitions, like "?" ":" "\" and "|". I would prefer to delete question marks and transform the others to "-". What is the best way to do that ? Kind regards Philippe -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2008-02-16 at 23:07 +0100, Philippe Landau wrote:
Before making a backup of a drive to a fat32 external usb drive, i would like to rename all files containing special characters not permitted on fat32 partitions, like "?" ":" "\" and "|". I would prefer to delete question marks and transform the others to "-". What is the best way to do that ?
You will loose permission data, too. You could consider archiving as tgz in the usb drive. Otherwise, you could consider mtools (mcopy). - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHt2nctTMYHG2NR9URAvaMAJ9cm5Q7ts4rbDCLa8yX9texid1/agCePa3q DlfzZ/xt+ibmQ9Yn7I+PIIw= =Y8vN -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
The Saturday 2008-02-16 at 23:07 +0100, Philippe Landau wrote:
Before making a backup of a drive to a fat32 external usb drive, i would like to rename all files containing special characters not permitted on fat32 partitions, like "?" ":" "\" and "|". I would prefer to delete question marks and transform the others to "-". What is the best way to do that ? You will loose permission data, too. Good, in this case :-)
You could consider archiving as tgz in the usb drive. Otherwise, you could consider mtools (mcopy). I want to change the file names also because i want to have access to them on other operating systems too.
Kind regards Philippe -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Philippe Landau wrote:
Carlos E. R. wrote:
The Saturday 2008-02-16 at 23:07 +0100, Philippe Landau wrote:
Before making a backup of a drive to a fat32 external usb drive, i would like to rename all files containing special characters not permitted on fat32 partitions, like "?" ":" "\" and "|". I would prefer to delete question marks and transform the others to "-". What is the best way to do that ? You will loose permission data, too. Good, in this case :-)
You could consider archiving as tgz in the usb drive. Otherwise, you could consider mtools (mcopy). I want to change the file names also because i want to have access to them on other operating systems too.
Why are you creating files with "?", ":", "\" and "|" in their names in the first place? While not absolutely prohibited in file names, they are "special" characters to most Unix shells, and extremely problematic when embedded in a name. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Philippe Landau wrote:
Before making a backup of a drive to a fat32 external usb drive, i would like to rename all files containing special characters not permitted on fat32 partitions, like "?" ":" "\" and "|". I would prefer to delete question marks and transform the others to "-". What is the best way to do that ?
The best way is to NOT do it, and make a tar archive (.tar or if you want, add the -z flag to get .tar.gz). Otherwise, you're going to lose ALL of your ownership and rwxrwxrwx permissions and other special mode bits (set UID, etc.)
Kind regards Philippe
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Aaron Kulkis
-
Carlos E. R.
-
Philippe Landau