Can I also move or copy directory hierarchy of a file when I mv or cp the file?For example, if I mv or cp dir1/dir2/file elsewhere, it will only mv or cp file. What if I want to also mv or cp dir1/dir2? Rather than mkdir -p dir1/dir2, can it be done with one command?
mv and cp directory hierarchy?
directory;file copy