I was trying to move a file with mv to see it works and now I cannot find it. The command I entered was:sudo mv ~/Documents/Books/UTMAnalysis.pdf /Desktop I am using OS X. Similar questions mentioned it might be in the root directory or somewhere as a hidden file. In the root directory there is a Desktop, but is that not the existing folder?
Attempted to move a file with mv command and now it is lost?
command line;files;mv
I suspect one of the following:renamedIf /Desktop did not exist when you ran that command it would have renamed the file UTMAnalysis.pdf to be Dektop. You could confirm if it was a directory or a file with this command:ls -ld /DesktopIf it's a directory the first character will be a d whereas if it's a file it will be a -. linux-okrz:~ # ls -ld file-rw-r--r-- 1 root root 0 Apr 29 19:43 filelinux-okrz:~ # ls -ld directory/drwxr-xr-x 2 root root 4096 Apr 29 19:45 directory/You can also run the stat command on it to see information on them:linux-okrz:~ # stat file  File: 'file'  Size: 0           Blocks: 0          IO Block: 4096   regular fileDevice: 807h/2055d  Inode: 20709419    Links: 1Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)Access: 2017-04-29 19:43:57.620769552 -0600Modify: 2017-04-29 19:43:57.620769552 -0600Change: 2017-04-29 19:43:57.620769552 -0600 Birth: -linux-okrz:~ # stat directory  File: 'directory'  Size: 4096        Blocks: 8          IO Block: 4096   directoryDevice: 807h/2055d  Inode: 20709424    Links: 2Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)Access: 2017-04-29 19:45:52.036413879 -0600Modify: 2017-04-29 19:45:52.036413879 -0600Change: 2017-04-29 19:45:52.036413879 -0600 Birth: -On the right-hand side of the output you can see regular file vs directory. If it's a file then you can rename it back and check to make sure you can still access it.Inside /DesktopThe next possibility is that it is in the /Desktop directory. If it is a directory(should be confirmed from previous suggestion), you didn't indicate whether you've checked in there or not. You can run this command as root to get a full layout of the directories and files in that directory:ls -lah /Desktop/From there you can see if you find the UTMAnalysis.pdf file.Hidden ActionThe third possibility is that there is another command or action that's been taken before or after this command you've listed that's done something else to the file. You can check your history with the history command to see if you can find any other command that has acted on that file. You could also try searching for the file with a find command as root:find / -type f -name *UTMAnalysis.pdf*If the above command doesn't find it then it either doesn't have UTMAnalysis.pdf in its name anymore, or no longer exists on the system.