Louisville, KY
Greg is a retired neurologist in Louisville, Kentucky, with a long-standing interest in computers and programming, beginning with Fortran IV in the 1960s. When Linux and open source software came along, it kindled a commitment to learning more, and eventually contributing. He is a member of the Scribus Team.
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.