On an Ubuntu server (16.04) I have the following mounted drives (df -h
):
I had a big file in my home directory and I ran the following command:
sudo mv Miras.txt /dev/sda3
It took time and apperently moved the files
However when I ran cd /dev/sda3
, it says:
-bash: cd: /dev/sda3: Not a directory
I noticed its mounted as /drive2
, but then again there is not my file on /drive2
either.
Where was my filed moved, and how can I access it?
So the answer is that you have moved your file and renamed it as sda3. so to revert open terminal at same location where you earlier opened it and run:
/dev/sda3 was a special node file that would otherwise be used to mount your USB disk. But you have replaced it with a *.txt file.
As your miras.txt file was in Home folder you no need to use
sudo
at all. If you run yourmv
command withoutsudo
it will show "Permission denied".Now unplug and replug-in sda3 if it was a USB stick otherwise you can use:
Otherwise you can just restart the system. Linux will automatically recreate the device special /dev/sda3 if necessary.