1

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.

8
  • 1
    the question isn't clear, nor is the data you provide. are you asking for what files you moved? They should be under /mnt/dc/RUNNING/3b_tar. if you are running echo instead of ls, it does seem like you broke the running systems libraries. are you trying to fix that? running a program where the linker is somewhere else isn't too hard. LD_LIBRARY_PATH=/path/to/lib /path/to/lib/ld-lsb-x86-64.so /path/to/bin/ls should work
    – toppk
    Sep 15, 2022 at 4:53
  • Sorry, I updated the question. I am trying to find the directories or files that disappeared after running the command. I used the echo * command because that was the suggestion in another answer to the same question. In the other answer... the echo * command showed where the files ended up. I tried that but I still cant find the files.
    – lessharm
    Sep 15, 2022 at 15:21
  • 1
    okay, but I still dont know what directory you are running the echo in. any files/directories you moved should be in /mnt/dc/RUNNING/3b_tar and if you don't know what was in there before it will be hard for you to spot the moved files. mv will not overwrite directories with files in them, so just running ls /mnt/dc/RUNNING/3b_tar should give you a clue of what you moved.
    – toppk
    Sep 15, 2022 at 15:46
  • Ok, maybe the issue is I thought I ran an incorrect command. When in fact what I did was I ran the mv command from /mnt/de to /mnt/dc (two separate drives). Normally this would be instant. After the console hung for 5 seconds I hit ctrl+c. Only one directory was moved over and like 5% of the files are in that directory. The directories are probably 500gig in size and I just want to delete them if they exist somewhere on the system.
    – lessharm
    Sep 15, 2022 at 18:18
  • 2
    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 the mv command. I would suggest, take the time and gather an ls -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.).
    – toppk
    Sep 15, 2022 at 20:43

1 Answer 1

1

The files in the directory (/mnt/de/STORAGE) where I ran the command mv * /mnt/dc/RUNNING/3b_tar were:

100bb_3b_bbvbu_tar  100bb_3b_bbvco_tar  100bb_3b_bbvep_tar  100bb_3b_bbvmp_tar

I am guessing the command was taken as:

 mv 100bb_3b_bbvbu_tar  100bb_3b_bbvco_tar  100bb_3b_bbvep_tar  100bb_3b_bbvmp_tar

Resulting in the first 3 directories being placed in:

 /mnt/de/STORAGE/100bb_3b_bbvmp_tar

(pretty confusing that /mnt/dc/RUNNING/3b_tar wasn't the final destination. Maybe because its a separate drive?)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .