Greg Pittman

Authored Comments

When I backup my /home/gregp directory to an external drive, I first go to one level above, then
cp -av gregp /destination
The -a flag stands for archive and is the same as -dR, and an important feature is that it retains the timestamps. I find myself looking for files sometimes based on when I created or last saved them, so the timestamps can be very useful. Why do I go to one level above and not just stay in /home/gregp and do this?
cp -av * /destination
The reason is that this method will not copy the dot-files and dot-directories (so-called hidden files).
A command (somewhat) related to cp is mv, since what this does in a sense is cp a file, then delete the original. As far as I know, it does this by changing the files registry and not actually copying, since mv keeps the same timestamp as the original.

This looks like a recipe for confusing myself.