Question: Where did the files go?
I unintentionally typed the wrong path (/mnt/dc
instead of /mnt/de
) when moving a couple of large directories. My intention was to move the files to a new path on the same drive but instead my destination path was a separate drive. Its around 500gigs of files. After 5 seconds I canceled the command with ctrl+c. 90% of the files are now missing. They are not in the source or destination path. What are the steps I can take to figure out where they are?
Command Used:
mv * /mnt/dc/RUNNING/3b_tar
Directories inside /mnt/de/STORAGE
100bb_3b_bbvbu_tar 100bb_3b_bbvco_tar 100bb_3b_bbvep_tar 100bb_3b_bbvmp_tar
Result:
Only one folder remains in the source path. Only one folder made it to the destination path (with most of its contents missing). Two folders are completely missing.
Reason for edit
I originally thought that the issue was with the *. So I was troubleshooting that using this answer. After toppk's comment I looked at the paths and realized I was actually moving the files to a different drive.
LD_LIBRARY_PATH=/path/to/lib /path/to/lib/ld-lsb-x86-64.so /path/to/bin/ls
should workls /mnt/dc/RUNNING/3b_tar
should give you a clue of what you moved.mv
is pretty safe, it will only remove from the source once the destination has finished being written to, even if you cancel it while it is running. I am still trying to piece together what you ran and in what directory. for example, why is /mnt/de/STORAGE important? that wasn't themv
command. I would suggest, take the time and gather anls -lR
output for ever filesystem you have, and put the question to rest (for my big filesystems I do this daily in cron so I have a recent picture of the filesystem I can examine without too much hassle.).