LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-31-2014, 02:27 PM   #1
monkeyslut
LQ Newbie
 
Registered: Aug 2014
Location: malmö
Distribution: Ubuntu x86-64, Raspbian, raspbmc, debian
Posts: 19

Rep: Reputation: Disabled
accidentally removed files with mv command


Hi!

I did something silly with my Raspberry Pi, running Raspbian.

I misused the "mv" command, not specifying a target filename. I tried to move an entire folder, and everything in it, but I just specified a path, and not a target filename, and thereby removing my entire video library.
Oops.

The problem is, the files still take up space on the harddrive. I'm not sure how to clean that up.

Does anyone know how that should be done?

Thank you for your patience

<3
/monkeyslut
 
Old 08-31-2014, 02:34 PM   #2
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
The 'mv' command doesn't work without a destination target.. What is the exact command you executed?
 
Old 08-31-2014, 02:47 PM   #3
monkeyslut
LQ Newbie
 
Registered: Aug 2014
Location: malmö
Distribution: Ubuntu x86-64, Raspbian, raspbmc, debian
Posts: 19

Original Poster
Rep: Reputation: Disabled
I'm trying to dig through my command history, not sure... could it be this one?

$ sudo mv ./serier ./downloads/serier

There was a directory 'serier', that I was trying to move into the 'downloads' directory. But I failed, and when looking in the intended target directory, it was empty. The command removed what was in the target directory before firing the command.
 
Old 08-31-2014, 03:08 PM   #4
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Hmm.. This command should have done the trick... The only thing is that if ./downloads/serier existed prior to the mv command, then the initial directory will be copied inside that one (end-resulted path being ./downloads/serier/serier)... Other than that, the command is ok and you should have all the files in there..

If there still is a problem (missing files but occupied space), you need to run e2fsck on the partition..
 
Old 08-31-2014, 03:11 PM   #5
monkeyslut
LQ Newbie
 
Registered: Aug 2014
Location: malmö
Distribution: Ubuntu x86-64, Raspbian, raspbmc, debian
Posts: 19

Original Poster
Rep: Reputation: Disabled
e2fsck, thanks, I'll look into that!
 
Old 08-31-2014, 03:32 PM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Check in lost+found & /
 
Old 08-31-2014, 03:49 PM   #7
monkeyslut
LQ Newbie
 
Registered: Aug 2014
Location: malmö
Distribution: Ubuntu x86-64, Raspbian, raspbmc, debian
Posts: 19

Original Poster
Rep: Reputation: Disabled
Oh. Nope, it's a FAT drive, and an external drive, much larger than the Pi's disk, so nothing's hiding in lost+found...

I'll go looking for a FAT equivalent of e2fsck then...
 
Old 08-31-2014, 04:18 PM   #8
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 306

Rep: Reputation: 121Reputation: 121
Maybe you are looking in the wrong place. Try this:
Code:
sudo find / -type d -name serier -print
 
Old 08-31-2014, 04:33 PM   #9
monkeyslut
LQ Newbie
 
Registered: Aug 2014
Location: malmö
Distribution: Ubuntu x86-64, Raspbian, raspbmc, debian
Posts: 19

Original Poster
Rep: Reputation: Disabled
Huh. there it was, tucked away deep into enemy territory. Thanks for that, friend!

Either way, though, anyone know of a e2fsck-like program for FAT disks?
 
Old 08-31-2014, 09:44 PM   #10
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,961

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
Quote:
Originally Posted by monkeyslut View Post
Either way, though, anyone know of a e2fsck-like program for FAT disks?
fsck.msdos. Should be part of dosfstools or some other package, depending on your Linux distribution. Once you've got it properly installed, just running "fsck {device}" should find it automatically.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to recover my home directory which I accidentally removed using rm -rf command? shikshit.hep Linux - Software 6 10-05-2010 04:12 AM
accidentally removed aaa_base package eylli Slackware 3 08-12-2009 09:23 AM
Accidentally removed the default panel galapogos Mandriva 5 03-09-2009 11:21 AM
Accidentally rc0.d directory removed!!! jastazv Linux - Software 7 02-25-2009 02:44 PM
I accidentally removed the netstat command ! markraem Solaris / OpenSolaris 6 10-03-2005 11:18 AM


All times are GMT -5. The time now is 05:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration