In RHEL 9,
The command
cp -a /somedir/. .
executes to copy all files in 'somedir' directory (not the directory itself) to the current directory.The command
mv /somedir/. .
though yields the error 'cannot move: Device or Resource busy'.The commands
mv /somedir/ .
andmv /somedir .
result in moving directory 'somedir' to the present directory.
Questions;
Why does the second command result in an error?
Without the use of
*
is there a way to move only the contents of directorysomedir
and not the directory itself to the current directory usingmv
command?What is the difference between
/path/to/file/
,/path/to/file/.
and/path/to/file
in Linux specifically RHEL and RHEL like distributions?
rsync
behavior that is specific in those cases