Hi Tony,
Thank you for these commands.
I followed them all. Everything seemed to be working fine. But then I made a mistake. (Well, a couple actually!!)
First, I named the file ‘Pubic’ (instead of Public when typing in the ‘mv * Public’ command). Followed through with the rest of the commands as mentioned.
When I looked in ssh, all the folders were shown as expected (using the ls command).
Now for the 2nd (and a big one it is) mistake! These are the commands i entered:
ND22TB:/shares# ls
Pubic Test
ND22TB:/shares# cd Pubic
ND22TB:/shares/Pubic# ls
320GB :2eDS_Store Network Trash Folder Shared Pictures Software
500GB :2eapdisk Shared Music Shared Videos Temporary Items
ND22TB:/shares/Pubic# mv * ./Test
mv: target `./Test’ is not a directory
ND22TB:/shares/Pubic# mv *
ND22TB:/shares/Pubic# ls
Temporary Items
Basically, I wanted to move all the contents of ‘Pubic’ to ‘Test’. It gave me an error of
mv: target `./Test’ is not a directory
Then I typed 'mv * ’
I then realized that I ‘moved’ *(everything) to ‘nothing’
When I typed in the ls command it only showed me the ‘Temporary Items’ folder and nothing else.
I used the df command to check to see if the contents were deleted and it gv m the following result:
ND22TB:/DataVolume/shares/Pubic# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md1 1968336 1109124 759224 60% /
tmpfs 51200 0 51200 0% /lib/init/rw
udev 10240 6656 3584 65% /dev
tmpfs 51200 0 51200 0% /dev/shm
tmpfs 51200 2560 48640 5% /tmp
ramlog-tmpfs 20480 4928 15552 25% /var/log
/dev/sda4 1941348672 1589090176 352258496 82% /DataVolume
The /dev/sda4/ contents seem to be there as before.
My question is, can I ‘undo’ this erraneous ‘mv’ command. If not, is there a way to restore the data (which apparently is still there). Please help!
BTW, I am keeping the ssh terminal open…just in case, by logging out or shutting down the NAS, it might delete my data!
Charles
UPDATE!!!
I sorted it out.
I found out that all the files/folders (in the ‘Pubic’ folder) had been moved to the 'Temporary Items" folder. I could not access it (change directories to a folder with a space in the name). I did some research and figured out that in order to change to a directiry with a space in it I had to put it in between “” (cd “Temporary Items”). Once there I moved all the files & folders up one directory (mv * …/) to the ‘Pubic’ folder. Then I moved all files/folders (mv * …/Test) to the ‘Test’ directory (which I had created in the MBL browser dashboard). Checked the test folder on my Mac and I CAN SEE ALL MY FILES!!!
WAAAHOOOO! (reference to the movie I.Q.)
ANY WAYZ…
Thank You very much
TonyPh12345 !!! for this set of instructions!!! Was a great help (inspite of a few tense moments and idiotic moves)!! Now, I will try to see if I can restore my old WD My Book Live that I had taken apart.
Charles