[SOLVED] Accidentally deleted two directories on a mounted external...

Is there any way to restore them? I had an external hard drive mounted at /media/extdrv/. On it, I had multiple directories, including:
/media/extdrv/downloads
/media/extdrv/movies
/media/extdrv/music
/media/extdrv/mukti
/media/extdrv/paperthin
/media/extdrv/anime
I was copying one folder to another using this command:
sudo sudo cp -R downloads/\[LIME\]\ His\ And\ Her\ Circumstances/ anime/Kare\ Kano
The "Kare Kano" folder did not exist, which may have caused the problem? Now, when I list the files/directories under /media/extdrv/, I get nothing:
[mukti@headcrab01 media]$ cd extdrv/
[mukti@headcrab01 extdrv]$ ls
[mukti@headcrab01 extdrv]$
I've heard of many different tools to fix this, but I have never used any of them (ddrescue, extundelete, etc). I didn't realize that that command would cause the deletion of all directories under /media/extdrv, but I suppose I was wrong? Is there anything else I should check before attempting to use one of these recovery tools? Is there a specific tool that might be more suited for my specific issue?
The external drive is formatted ext4:
/dev/sda /media/extdrv ext4 defaults,nofail 0 0
There was well over 300GB of data on the drive, so any help is appreciated!
Last edited by mukti (2013-09-22 18:44:26)

It actually looks like I not only entered sudo twice, I ran the command twice (the first time only using sudo once. From my history:
486 sudo cp -R downloads/\[LIME\]\ His\ And\ Her\ Circumstances/ anime/Kare\ Kano
487 sudo sudo cp -R downloads/\[LIME\]\ His\ And\ Her\ Circumstances/ anime/Kare\ Kano
Also, upon further investigation, this was another issue. I checked, and /dev/sda was not mounted, and sda was not listed under /dev. I ran over and found that the external hard drive was powered off (the system/ext hdd are not in the same room/on the same floor as I am). I was able to power it back up, but I'm not sure what would have caused this.
So I guess I posted this a bit too soon, and should have done some more investigation; however, I am curious as to why the drive would lose power. All other devices on the circuit were still powered on and running. Could the commands I issued have caused this?
This can be marked as solved, since my "problem" is no longer. Thanks for the help.
EDIT:
I should also note, this 'event' has made me realize that I could not afford to lose some of the data on this drive. As a result, I'm going out to buy another as a backup.
Last edited by mukti (2013-09-22 18:38:59)

Similar Messages

  • I have just selected all my desktop icons and accidentally deleted them.  This included my external hard drive with 22,000 photos in iPhoto.  I cannot open iPhoto now.  Can someone help please?

    I have just selected all my desktop icons and accidentally deleted them.  This included my external hard drive with 22,000 photos in iPhoto.  I cannot open iPhoto now.  Can someone help please?

    What is the file system of that external HD? is it MacOS Extended (Journaled)?
    Which iPhoto version do you have?
    If you directly select the iPhoto Library in the Finder and use "File > Get Info", does the library still show as "Kind: iPhoto Library" and is the file size correct for 22000 Photos?
    If the library does no longer have the correct size, restore it from your backup.
    But if the library has the correct size, try to open it directly by clicking it. This should work, if your iPhoto version is iPhoto '11.

  • [SOLVED]Accidentally deleted /lib64

    I was in the process of trying to get my matlab installation working (which I'm still unable to do) and I accidentally deleted /lib64. What was in it? How can I restore them? Everything seems to be working so at least it doesn't seem like anything important was in there.
    Last edited by Haptic (2011-05-05 02:48:47)

    sonoran wrote:[pcg@orpheus ~]$ ls -l /lib64
    total 0
    lrwxrwxrwx 1 root root 17 Feb 17 21:47 ld-2.13.so -> ../lib/ld-2.13.so
    lrwxrwxrwx 1 root root 27 Feb 17 21:47 ld-linux-x86-64.so.2 -> ../lib/ld-linux-x86-64.so.2
    yep , i was wrong

  • [SOLVED] Accidentally deleted graphical.target. Any way to resto..

    Hello all. So here's the story: I was trying to get SLiM to run via `systemd` and was following the instructions detailed here:
    # systemctl enable kdm.service
    This should work out of the box. If not ....
    /etc/systemd/system/default.target -> /usr/lib/systemd/system/graphical.target
    Simply delete the symlink and systemd will use its stock `default.target` (i.e.`graphical.target`).
    # rm /etc/systemd/system/default.target
    By some strange form of dyslexia, instead of writing the code on the last step, I had written
    # rm /usr/lib/systemd/system/graphical.target
    Of course, without this file, I'm now unable to boot succesfully. I'm also quite sure that it's impossible (or at least extremely impractical) to recover a file removed in this fashion. Is there a default `graphical.target` that I could download or see the lines of text, so that I can remake it?
    If I recall correctly, it was just 8-10 lines of text like other `.target` files, where half of it was commented out with some
    [ 'something'] = something
    written inbetween some of the comment lines. I appreciate your help!
    Last edited by nil (2012-10-20 15:25:32)

    WorMzy wrote:Does reinstalling systemd not give you back that file?
    Ah, I was under the assumption that `systemd` comes installed from the LiveCD/LiveUSB and not from `pacman`. I could definitely try reinstalling it with `pacman` right now and see what happens.
    nagaseiori wrote:
    This is my graphical.target
    Thanks! I'll see if that works first.
    EDIT: For anyone else as dumb as me in the future, the config works.
    Last edited by nil (2012-10-20 15:24:20)

  • [SOLVED] accidentally deleted curl, anyway to reinstall?

    I had some issues in curl and vmware player 5.0.1 in kernel 3.7.7-1, so I tried to remove curl (my bad, pacman -Rdd curl) and reinstall but reinstall fails
    pacman: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
    Appreciate any advice on how can I reinstall curl.
    Last edited by bam211 (2013-02-14 04:56:45)

    are you pointing to any particular options in pacman.conf? pacman works on other packages (those non dependent on curl) when I put libcurl.so.4 from vmware directory to /usr/lib... but any curl dependent package upgrade fails with the following error
    pacman -S curl
    pacman: /usr/lib/libcurl.so.4: no version information available (required by /usr/lib/libalpm.so.7)
    resolving dependencies...
    looking for inter-conflicts...
    Targets (1): curl-7.29.0-2
    Total Installed Size:   1.86 MiB
    Proceed with installation? [Y/n] y
    (1/1) checking package integrity                                                                                               [#############################################################################] 100%
    (1/1) loading package files                                                                                                    [#############################################################################] 100%
    (1/1) checking for file conflicts                                                                                              [#############################################################################] 100%
    error: failed to commit transaction (conflicting files)
    curl: /usr/lib/libcurl.so.4 exists in filesystem
    Errors occurred, no packages were upgraded.
    Last edited by bam211 (2013-02-14 04:23:43)

  • While syncing my google contacts with address book application on my macbook air I accidentally deleted directory services group on the left. How to get it back? Now I am unable to sync my contacts either with google or with icloud.

    I use OSX Maverics. On my macbook air OSX 10.9.4. On the left side (groups), I have accidentally deleted the Directories group. Now I am unable to sync contacts with gmail. What should I do?

    Add them back in Contacts/Preferences/Accounts. Use the + sign at the bottom.

  • I accidentally deleted some essential system files

    So, I accidentally deleted several directories from /usr...
    I have a ton of data on that computer that I cannot loose and cannot back up
    A bunch of packages like su, sudo, and even pacman are not there anymore
    Hypothetically, if I were to run this machine in a chroot, could I run pacstrap and get all the packages again? Or, will I have to run it in a chroot and manually download each package?
    Will either of these delete data from my computer? Will either of these even work?
    Last edited by dubble (2014-06-12 21:04:28)

    Id like to offer a few recommendations to prevent this in the future.
    First, I concur with everyone above- have a backup! It makes problems like these no big deal. A liveCD and rsync will have you back in business in no time.
    Second, if you use BTRFS, snapshots are an awesome feature. You could literally rm -rf /etc and all youd have to do is boot a prior snapshot. (P.S. Dont do this for any reason, even if you know what youre doing. It will work, but dont). I have my rootfs in a subvolume, and I have a snapshots subvolume. I have a bash script that takes snapshots once a week (total of 3) and I update using my own script that integrates optional preupgrade snapshots (in case the latest upgrade causes breakage due to Arch's rolling nature), news feeds, etc. You might want to consider something like this..
    Third, there is a cool utility called pakbak that could have saved you in this situation. It backs up your pacman databases whenever a database change happens. You could have restored pacman and your databases, then made sure everything was installed properly.
    Good to see you got out without data loss. Ive lost data due to not having a backup and it sucks!
    **EDIT** Link to pakbak in the AUR: https://aur.archlinux.org/packages/pakbak-git/
    Last edited by GSF1200S (2014-06-15 08:10:31)

  • Accidentally Deleted iWeb sites

    I accidentally deleted two sites from iweb. I had not yet published them to a folder. Is there any way to get them back? Anywhere I can look on on hard drive for these files? They must have gone somewhere!
    Thanks

    If you deleted them from iWeb and closed iWeb they are gone unless, as Fredrrr suggested, you got lucky with TM. If you haven't closed or saved iWeb type Command+Z several times to see if you can get them back.
    OT

  • I had made a copy of the main revel file on my mac, and then i put it in my google drive folder for safety. I accidentally deleted one of the two libraries form my iPhone. I opened it up and panicked and thankfully I guess I had a backup of the other libr

    I had made a copy of the main revel file on my mac, and then i put it in my google drive folder for safety. I accidentally deleted one of the two libraries form my iPhone. I opened it up and panicked and thankfully I guess I had a backup of the other library in my spouses phone... but mine is still gone. I don't have them saved to my computer... the pictures are important and I really really need them back.  Is there a way for me to get the pictures back from what I believed at the time was a smart way to backup when i made a duplicate of that main mac file to my google drive? The best way to let me know is my email... [email protected]  I am really relying on you guys if there is a way?

    Hi meghage,
    From your code, it is a WebForm project.
    This forum is to discuss problems of Windows Forms. Your question is not related to the topic of this forum.
    You can consider posting it in asp.net forum for supports . Thanks.
    ASP.NET: http://forums.asp.net
    Regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do I addmy I tunes songs to my I phone if I have two different I tune accounts? Ive heard of people accidentally deleting all of their phone info when trying to do so, so I'm trying to avoid that!

    How do I addmy I tunes songs to my I phone if I have two different I tune accounts? Ive heard of people accidentally deleting all of their phone info when trying to do so, so I'm trying to avoid that!

    Rick Fernandez1 wrote:
    I don't know why the songs aren't matching.
    Just because a song does not "match" does not mean it won't be available in the cloud. Non-purchased tracks that are not matched will be uploaded to the cloud. You need to enable the iCloud Status. Pull down View > View Options and select "iCloud Status" then close the small window.
    Rick Fernandez1 wrote:
    iTunes only shows one kind of cloud icon next to songs, viz, a cloud with a down arrow set in a grey background. There are no cloud icons next to any other songs. I'm not sure what their status is consequently.
    Unless you've deleted the track from the iTunes library you shouldn't see any cloud icons next to songs that have been successfully processed. Did you delete any tracks?
    Rick Fernandez1 wrote:
    What is really want is to match and also be able to keep the songs that don't match. Are these mutually exclusive goals? If so, then I don't want iTunes Match after all.
    You do. The tracks in the iTunes library are not touched or modified in any way. They stay right where they are unless you delete them.
    Rick Fernandez1 wrote:
    Also, I thought Match was supposed to convert the songs that are matched to 256 kbps. This has not at all happened. I don't see any that were upconverted at all.
    This does not happen automagically. You must delete the track from the iTunes library and download the "matched" track. But upgrading only works for tracks that have been "matched." Tracks that have been "uploaded" are exactly the same as what was on your HDD. See my instructions above to enable the iCloud Status column.

  • [Solved]Oops, I accidentally deleted the "Beginner's Guide" wiki page.

    My apologies, I am trying to fix my mistake right now, but if someone could help me out, the sooner the better.  I accidentally deleted the Beginner's Guide wiki page, trying to add my own edit.  Will post back when I get it back to the last revision.
    Last edited by kiloecho7 (2008-12-15 19:24:25)

    It seems like everybody and their hot sister heard of this Beranger person except me
    Update: can't say I checked any of his older posts but I guess I've seen part of his 'dumping linux' blog post -- most likely the one that 'angried' people and said sisters. I can only ask myself: what the big deal is? Who actually cares? Personally I never understood blogs nor the need to have them .. but it was my opinion that these unfortunate inventions were supposed to be destined for your friends (+sisters) to read. So I can't understand this: why does anybody else in the world -- care -- about what that guy uses/doesn't use? What makes him so important / such a(n) hero.
    Last edited by string (2008-12-16 21:11:02)

  • HELP! I Accidentally deleted the iTunes folder in the My Music folder

    HELP! I Accidentally deleted the iTunes folder in the My Music folder so I lost the two files
    iTunes Library.itl
    iTunes Music Library.xml
    As I understand it, these files contain all the play counts, ratings, etc. and I've spent weeks getting this info the way I want it and don't want to lose it.
    I have all my mp3 files on my desktop computer HD under a seperate directories, so I'm not worried about loosig origninal music files. I don't have iTunes copying the files when I add them to the library and I do have "Keep iTunes Music folder organized" checked. I have not relocated any of the original music files.
    I have not auto synced my iPod, and I can open the iPod in iTunes and all my songs, with play counts, ratings, etc. are there. I just want to get the playlists, play counts. ratings, catagories, etc. back to my PC.
    Is there any way to get the playlists, play counts. ratings, catagories, etc. from the data on the iPod and recreate the .itl & .xml files on my PC? I see there are many files on the iPod two of which look promising "iTunesDB" & "iTunesPlaylists".
    Can someone please tell my how to recreate just the .itl & .xml files by using the info on the iPod itself? Again, I have not relocated or lost any of the original music files, I just want to get the playlists, play counts. ratings, catagories, etc. back that are stored in the .itl file.
    I really don't want to have a software utility copy the info over as then I will have two copies of my music files and I've spent a lot of time organizing and naming the mp3 files just the way I want (not the way iTunes wants).
    I've read many posts and it seems many have screwed up recovery by trying things without clear direction.
    Thanks for the help in advance.

    Try some of the more robust recovery/trnsfer programs. Several can recover the playlists, and metadata of the songs on the iPod. Do some reading on the respective websites.
    These links will give you several methods of recovering whatever songs remain on your iPod; some free, some third-party software, some more comprehensive for restoring Playlists, Ratings, Play Counts, etc. Read them and their associated links before deciding on a strategy that works for you. There are many various third-party software programs that will offer a more robust process, or an easier GUI. Do a Google search for them if the links below leave you wanting…
    Don King Resurrected: Deleted files from hard drive (free user steps – music recovery only)
    MacMuse: Computer Crashed (free user steps – music recovery only)
    Copying music from iPod to computer (a primer on various methods and software)
    Copying Songs from Your iPod to a Mac or PC (resource for 3rd party software)
    iPodRip Software
    PodUtil Software
    Senuti (Mac OS X v10.3 or higher Recovery Utility)
    XPlay (Software For Music Recovery &/or Cross-Platform Functionality)
    XPlay Photo Browser (For recovering Photos)
    After recovering your song files, strongly consider developing a thorough backup strategy for just this type of situation.
    You need at least two full sets of your music, not including what is on the iPod:
    -- One full set on the PC within iTunes (on internal HD or ExHD)
    -- One full set on an separate external backup medium (CD/DVD/ExHD/other)
    -- One (full or partial) set on the iPod
    Music files on just the iPod and only one other medium is not considered having any backup.
    If you cannot store your complete music files on the computer’s internal HD, then create and maintain at least two external sets (any multiple combinations of ExHDs, DVDs, CDs).
    Backup both the music files and the Library database file (iTunes Library.itl). What are the iTunes Library files?
    Here is a post on developing a thorough backup strategy: http://discussions.apple.com/click.jspa?searchID=394618&messageID=1263275

  • Accidentally deleted /usr/local/bin

    I was setting up some folders after compiling a package, and I accidentally did a 'rmdir /usr/local/bin', and then 'sudo !!', and I entered my password.  rmdir returned 0 on exit so I assume it successfully deleted the folder.  My question is, was there anything important on that folder? (I'm using a fresh installation I did two days ago, no AUR packages installed, only installed packages from the official repositories).  If not, I guess I'll create an empty new one and continue like nothing happened.

    drcouzelis wrote:
    It's empty by default.
    fred22 wrote:If not, I guess I'll create an empty new one and continue like nothing happened.
    If you do that it'll be just like new.
    Thanks for answering, I guess I'll do that.  Also, I checked rmdir's manpage and realized it only deletes empty directories. :-)

  • Accidentally deleted Automator

    Hi
    I seem to have accidentally deleted the Automator application by deleting the icon from the application folder and then emptying trash. I tried searching for it in Spotlight to see if the application exists elsewhere on the HD but couldn't find it.
    How can I restore the application and put it back in the my Applications folder? I'm relatively new to Macs.
    Thanks

    How to Use Pacifist to Replace Deleted OS X Applications
    Download the shareware utility Pacifist from VersionTracker or MacUpdate. Use it to extract a fresh copy of the missing item(s) from the file archives on your OS X installation DVD. The file archives are in the /System/Installations/ folder (use Go to Folder option in the Go menu of the Finder.)
    Here are Four Basic ways to use Pacifist (courtesy of George Orville.)
    A. Drag a .pkg icon onto the Pacifist window .....proceed to step 7.
    B. Click on “Open Package ....” and navigate to package desired and click “Open” in the open/save window.....proceed to step 7.
    C. Insert Mac OS X installer CD and when it mounts, navigate to .... Menu->Go->Go to Folder.
    In the path field enter or paste ....
    /Volumes/disc name/System/Installation/Packages (where disc name is the name of the CD/DVD that you inserted.
    • Click on the "Go" button .....
    • Drag a .pkg to Pacifist..... proceed to step 7.
    The package you'll need will have to be discovered by trial and error, but for most applications you should start with the Essentials.pkg and/or Additional Essentials.pkg.
    D. Insert your Mac OS X install disk 1 .... and open Pacifist.
    1. In Pacifist, select "Open Mac OS X Install Packages" ... dialog may appear asking for disk 2, then disk 3 and finally disk 1 again.... {if DVD is not used)...If “Stop Loading” is selected...the procedure will stop!!!
    2a. When loading is complete, a new window appears, click the triangle to display contents of each package...Select item and proceed to step 7.
    2b. or click the “Find” icon in the Pacifist window and type the name of the software you need.
    3. In the list that comes back, click the top most entry for the item that you want. ..... that is the one for the English language.
    4. On the top of the Pacifist window, click “verify” .... you will probably be prompted for your password.
    5. Enter checks for.... “verify permissions” and “verify file contents.” and click “verify” ....enter password when prompted.... you will get back output which may look like this:
    20 files were scanned.
    20 of 20 files were present on the hard disk.
    0 of 20 files had file permissions that did not match those specified in the package.
    0 of 20 files had checksums that did not match those specified in the package.
    6. Click “close”. Go to step 7.
    Extract or Install........
    7. In the Toolbar (upper left), you now have the option to extract or install. Click a file in the lower list and those two icons will be enabled.
    8. If “Extract to...” is selected.... navigate to the location where the file will be placed, select “choose”, select “extract” in new dialog that appears,authenicate , if prompted, click “OK”.
    9. In the next dialog, click “Extract”.
    10. If “Install” is selected... dialog will appear with the location/path of the installed software. Click “Install”
    11. Type in your password, click “OK”
    • Pacifist will begin to extract files.
    12. In steps 8/10ß.... you also have the choice to “cancel”
    Notes.....
    • Pacifist may find that a file it is installing already exists on the hard disk. Pacifist will present you with an alert panel....
    Stop
    Leave original alone
    Update ..... Default selection
    Replace .... Replace option should only be used on full install packages

  • Accidentally deleted /var folder, now recovery utilities not responding to trackpad/keyboard!

    So I did something completed stupid, and now have a big problem.
    I accidentally deleted /var folder and emptied the trash!!
    Now my MBP is stuck at the grey start up screen with the apple & spinng wheel and won't start up..
    The weird thing is, now when I enter recovery utilities, everything displays fine except I cannot click anything! The mouse pointer moves but won't respond to clicks! Same with the return on keyboard. Arrow keys work to move among 4 options on os x utilities (time machine/ reinstall/ online help/ disk utility) but when I hit enter, no response! The trackpad & return key works fine up until the point where the mbp asks which language to run the recovery utilities.
    All my data is backed up online, and now I just want to reinstall os x and start using my mbp again!
    I tried reinstall with an installation disc by holding down 'c' on start, then I hear the installation dvd spinning for 3 seconds, then it would start ticking and won't do anything else for a few minutes until I force shutdown.
    Please!!! Can anyone help me?? How can I reinstall os x??  I would really appreciate!!
    Thank you Thank you Thank you in advance.
    -Michelle

    I know it's late but maybe it will help other people.
    I ran into the same issue and none of the solutions listed by apple helped.
    I booted into single-user mode and I read the log in /Volumes/Macintosh\ HD/private/var/log/system.log, it was full of errors like theses
    Dec 30 18:03:28 MacBook-Air locationd[352]: libcoreservices: _dirhelper: 454: mkdir: path=/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/C/ modes[2]=0700: No such file or directory
    Dec 30 18:03:28 MacBook-Air.local locationd[352]: could not create persistent store directory (Input/output error)
    Dec 30 18:03:28 MacBook-Air locationd[352]: libcoreservices: _dirhelper: 454: mkdir: path=/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d/C/ modes[2]=0700: No such file or directory
    The system actually tried to create directories in /var/folders but the directory /var/folders did not exists, so I created it:
    Under single-user mode:
    mount -o update /
    cd /Volumes/Macintosh\ HD/
    mkdir var/folders
    mkdir var/folders/zz
    reboot
    And it booted just fine !

Maybe you are looking for

  • Setting dynamic attachment name in mail adapter

    Hi experts, I have a mail adapter that send e-mails from ECC to several address. I have configured dynamically the FROM and TO field using the code showed below in message mapping: public String SetMailParameters(String Mail_address_to, Container con

  • [SOLVED] No sound in browser

    Hi everyone! I recently moved from Ubuntu to Arch (Yeah!). Everything was fine, the installation was quite easy and I found everything I needed with on the official repos and AUR. I only have one major problem: There is absolutely no sound in my brow

  • Sales order net value

    How and where the sales order net value will be communicate with credit management as a open order value?

  • Win 7 does not associate swf with Shockwave Flash Captivate 7

    I created a test file and when I went to publish it in Win 7, there was no application for the swf file.  I tried to find Shockwave Flash or Macromedia and I could not find anything to associate it with.  I looked on the Internet and someone suggeste

  • Maintain Web Server  settings in SWu3

    Hi all, We are working on SRM 7.1. Can someone pls explain me the use of the node"Maintain Web Server " in SWU3  transaction? If we are using UWL in Portal to execute the work items,do we need to activate this setting in SWU3? Pls advise.