3

This is on Mac OS X Lion, and I use the following to back up a project folder

cp -Rp ~/foo /Volumes/KINGSTON

or

cp -a ~/foo /Volumes/KINGSTON

The -p or -a is so that the timestamps of the files are preserved. (KINGSTON is the USB flash drive, and Get Info says I have permission to read and write on this device).

But it will give many errors such as:

cp: chflags: /Volumes/KINGSTON/Proj/Proj/Color.h: Invalid argument

Can this be fixed? thanks.

nonopolarity
  • 535
  • 3
  • 6
  • 17

1 Answers1

4

What filesystem is your KINGSTON formatted to? If it is FAT32, I would guess the file you have mentioned have some attributes which cannot be set on a file in the FAT32 filesystem. In that case, if all you want to preserve is the timestamp, you may:

  1. Switch to use some other command for backup, such as rsync
  2. Reformat your KINGSTON flash drive to HFS+
  3. Remove the special attributes on that file, and hope it won't happen in the future
Raymond Tau
  • 682
  • 3
  • 16