![]() ![]() You can also use rsync and tell it what you want to preserve. ![]() With GNU cp, you can use the -preserve=… option to contol what metadata is replicated more finely, e.g. The file's modification time isn't preserved. This preserves the file's permissions to some extent (e.g. cp "$backupfile" "$destination" & rm "$backupfile" Since you're moving to a different filesystem and you don't want to replicate much metadata, you might as well copy the file then remove the original. When you move a file to a different filesystem, mv copies the file, attempts to replicate as much metadata as possible, and removes the original. When you move a file within the same filesystem, mv detaches the file from its old location and attaches it to its new location metadata such as permissions remains the same.
0 Comments
Leave a Reply. |