A script which runs on Solaris uses
cp to copy a single file into a destination directory.
On occasion this
cp command will overwrite that destination directory with the file being copied
For example when trying to move
test.txt to the directory
cp /home/user/Docs/test.txt /home/user/Dest
Dest directory becomes a text file with the contents of
test.txt which has been renamed
I am able to get around this issue by using:
cp /home/user/Docs/test.txt /home/user/Dest/test.txt
What could be causing this issue?