Undo terminal command

I recently followed these instructions to stop iTunes from automatically downloading tv shows every time I opened it:
With iTunes open select iTunes > Preferences... and click the Store tab
If checked, uncheck checkbox Always check for available downloads
If checked, uncheck checkbox Download pre-orders when available
Click the OK button, and close iTunes
Open Applications > Utilities > Terminal.app
Type cd ~/Music/iTunes/iTunes\ Media/Downloads then press <Enter>
Type rm -rf * to delete the plist file along with all of the downloads of TV shows
Re-open iTunes. There shouldn't be TV shows automatically downloading any longer when you open iTunes. Breath. Relax. Rejoice.
The result was, on restarting the computer, that all my documents, iPhoto library, iTunes library, and Mail folders were gone. I realize now that I'm not expert enough be running Terminal commands. My question is: is there any way to undo this damage?

If you don't have a backup of them, try using a data recovery product such as the ones listed here. Don't write anything else to the drive until the files are recovered or you choose not to recover them.
(113837)

Similar Messages

  • How to undo terminal Command ?

    Hey All ,
    I recently added a command to increase my magic mouse tracking but i would like to undo it, command is below.
    defaults write -g com.apple.scaling 5.0
    thank you

    First google hit agrees with Kappy. 1.0 is the default value. So to undo your damage, type:
    defaults write -g com.apple.scaling 1.0
    ...into the console. If you had written a longer, more complex command into the console, occasionally it helps to use up-arrow to go back to what you just wrote, and then edit it. In your case however you probably had to restart finder or logout/logon to make the change stick, right?

  • How to undo terminal commands

    ...sigh... being new to MAC I shouldn't have just assumed I could putz around and make changes like I used to with PC.
    So, I use Gradebook (I'm a teacher) and unfortunately, it's reliant on Java.
    So the other day I made the mistake of updating Java and it sent my world into a tailspin.  Gradebook suddenly stopped working.  It would just bounce in my dock but never open.
    Then I found out it was having issue with the new Java.  So I found instructions  to reverse the Java update  and go back to Java 6 here which required me to go into terminal and make changes:  http://support.apple.com/kb/HT5559?viewlocale=en_US
    I did that.  Now everyone claims that Gradebook fixed their issue with the new Java.  But I'm still having that bouncing then nothing problem.  So someone suggested I upgrade to Mavericks.  So I did... and when I re-tried Gradebook it told me I needed to download Java 6 for it to work, so I got excited thinking my problems were solved.  But nope... bouncing in the dock then nothing.
    Now I'm thinking those changes I made in Terminal are what the problem is.  So I googled how to remove those entries and I went into .bash and deleted them (kept a copy of what I was deleting though, just in case)  Didn't work.  So now I've read that I have to UNDO my changes and not delete them.  But I have no idea how to do that.
    This was my entire history in that .bash file:
    /Applications/Android\ File\ Transfer.app/Contents/MacOS/Android\ File\ Transfer ; exit;
    'lookupd -flushcache''lookupd -flushcache'
    'lookupd -flushcache'
    'lookupd -flushcache
    'lookupd -flushcache'
    /Applications/Gradebook.app/Contents/MacOS/JavaApplicationStub ; exit;
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
    sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI .plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
    sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI .plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo update_prebinding -root / -force
    sudo update_prebinding -root/-force
    exit
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    man sudo
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    The red are the ones I put in.  That blue one references Gradebook but I don't recall entering that.
    Help me please???   I'd really, really appreciate it! 

    There are instructions at the bottom of the page you linked to that tell you how to undo it.
    Editing the .bash_history file only removes commands from the recorded history, it doesn't undo them. Although doing that isn't going to cause any problems, it does reveal a tendency to fiddle with "arcane knowledge" without fully understanding it. That's very, very bad, as doing the wrong thing in the Terminal could easily cause irreversible damage to the system that can only be fixed by reinstalling. It could even lead to data loss.

  • Help, i made a terminal command and i don't know how to undo it.

    i found my long lost folder of terminal commands.. and i forgot what this one did, so i clicked it (i made the commands into a "unix executable file").. and all my files on my desktop are now hidden.. the only way to find them is to type in the file name into finder.
    the command i typed in was
    while (true) do
    chflags hidden ~/Desktop/*
    done
    and now everything on my desktop is gone, and i dont know how to undo it, I undid once about 3 months ago when i wrote it, but i forgot what i did. I tried counterering the command with others but it isn't doing anything. thank you
    edit: i know this command cant destroy my system because it wasn't a sudo, but still, i had all my class work on my laptop and now it's all invisible

    Hi, try this...
    while (true) do
    chflags nohidden ~/Desktop/*
    done

  • Help ... I've accidentally deleted all data of my user in the terminal. what to do? Can i undo the commands?

    Help ... I've accidentally deleted all data of my user in the terminal. what to do? Can i undo the commands?
    greetings from austria

    You cannot undo commands. When you delete/remove files with the rm command the files are not put in the trash where they could be recovered. They are gone.
    You should have your system backed up with Time machine and/or backup clone of your system. Use them to recover you files.

  • How can I undo a terminal command?

    I have altered the default location of screenshots taken on my iMac. Origionally the screenshots were sent to my desktop.
    I created a folder and named it screenshots. I then opened a terminal screen which was found in the finder, under utilities. Then I copied the following into the command line "defaults write com.apple.screencapture location". Then before clicking return, I dragged the folder I named "screenshots" into the terminal window. Then I typed "killall SystemUIServer" to reset the terminal and the changes took effect.
    I am curious now, how to undo these changes if I want to?

    I don't believe you are using a PPC iMac, so you may want to change your profile configuration to include all the information about your hardware.
    A good utility for doing these types of configurations without the need to know Terminal commands is MacPilot 4.3.1.

  • .DS_Store files undo delete command in Terminal

    I was copying large quantities of files to a poorly formatted LaCie 3T external drive and kept coming up with interruptions in copying because the Finder kept "seeing" the creation of .DS_Store files. I researched and found a command for Terminal which stopped the OS from creating .DS_Store files. I restarted my laptop and sure enough, no more .DS files are being created.
    I was then able to complete the massive transfer, I reformatted the drive, and returned all of the files to the 3T drive. Now everything's working alright.
    My question is... How do I return the creation of .DS_Store files back to normal?
    Can anyone drop me a line that I can insert into the terminal command line and get it done?
    Thanks in advance.

    You know, I did that, and nothing happened. So I then decided to re-install M.L., and I'm now manufacturing .DS_Store files with abandon.
    I've been reading that it's not a popular kind of file for folks, especially those who are working with variously formatted devices. There are some obscure advantages to having the files sit around the hard drive.
    Thanks for your advice, however. It's good to know that I wasn't so far off.

  • Is there a terminal command to disable the "Boing' sound ?

    Hello, Everyone
    I was wondering if any one knows if there is a terminal command that can
    be used to disable the "boing" sound that folders and files make (in Tiger)
    as they are being moved about the desktop and or into finder windows.
    A couple of people have looked in the System preferences,usual areas but
    can not locate the file for this "Boing" sound. If any one knows I would love
    the answer. TIA for reading this & any help.; )
    Regards , Eme
     Power PC G4 (3.3) ♥ iMac Flat Panel 10.3.9 ] 15 Alum.PowerBook Tiger   Mac OS X (10.4.6)   AEBS & iMac Intel Core Duo 2gb
    Message was edited by: Eme~

    Mine doesn't make a sound when I do this.
    I presume you have unchecked the "Play user interfacesound effects" > in System Preferences> Sound. The other OP wants to disable only the infamous boing. I found both the files you wrote of. Thank you very much !
    I just needed to summarize this & then undoing if so desired.
    Bill, please what would the command be for undoing this action ?
    Launch Terminal and type this: sudo gzip
    enter ~~
    password prompt,
    then this : /System/Library/PrivateFrameworks/ScreenReader.framework/Versions/A/Resources/S ounds/SpringForward.aiff
    Is this correct ?
    Thanks so very, very much for your expertise, patience and sharing it with me.~ Eme
     Power PC G4 (3.3) ♥ iMac Flat Panel 10.3.9 ] 15 Alum.PowerBook Tiger   Mac OS X (10.4.6)   AEBS & iMac Intel Core Duo 2gb

  • Urgent!! - - Terminal command may be interfering with my G Raids.

    After I had entered a command into the Terminal and restarted the computer, my 2 external drives (G Raid mini and G Raid) do not show up nor can I use them at all on my laptop.
    The command I had entered was sudo touch /System/Library/Extensions. It is for my Shuttle Pro editing mouse.
    Is there a way to undo this command. I think it might be interfering with their operation.
    Thanks.

    I have performed the disk repair in Disk Utility and it stated that it repaired any permissions that might have been in need of repair.
    But did you Repair the Disk before Repairing Permissions?
    "Try Disk Utility
    1. Insert the Mac OS X Tiger Install disc that came with your computer, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
    5. Select your Mac OS X volume.
    6. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)

  • Terminal Command Mistake

    I screwed up while trying to make my library folder visible and typed the following command in Terminal:  chflags ~/Library
    Is this going to cause problems and if so, is there a way to delete it?  I also added the correct Terminal command and the Library folder is now visible.
    Thanks much!

    That is correct, after typing: 'chflags ~/Library' and hitting "Enter", I typed: 'chflags nohidden ~/Library' and "Enter"  Thanks much for your reply!  No way to undo what I did? 

  • Done Something Dumb, Please Help With Terminal Command

    OK, So I couldn't figure out why I was no longer getting Growl notifications with mail.app and GrowlMail after I upgraded to 10.5. Turns out it has something to do with the bundle version it is running. I ran the following 2 terminal commands found here : http://www.davidroessli.com/logs/2007/01/gettinggrowlmail_towork/
    they were:
    defaults write com.apple.mail EnableBundles 1
    defaults write com.apple.mail BundleCompatibilityVersion 2
    Once I launched mail.app again the application told me that it had shut off support for the Plaxo plugin that I use. Now neither Growl nor the Plaxo plugin work. Long story short, can someone explain to me how to put mail.app back the way it was before I foolishly ran terminal commands? Thanks in advance

    Email the author. Growl isn't supported by Apple.
    You are aware that the article was written quite a while before 10.5.2 was released? It's not a good idea to implement modifications that are not tested on the current version of OS X without checking first with the author of such modifications. It's especially not a good idea to use the "defaults write" command without knowing how to undo the change.
    The first command is undone by substituting 0 for 1. Change the second one from 2 to 3.

  • What is sudo command for? can I undo sudo commands?

    what is sudo command for? can I undo sudo commands?

    Niel wrote:
    If a dialog box appears that asks for your password, ask yourself whether you're doing anything that requires it, such as logging in, using sudo, moving or copying items in some system-level folders, or installing software. Mistyping a command may delete files that should remain intact, or damaging the Mac OS X installation by moving files around or altering permissions on certain components.
    (30169)
    Is there any way that I could know that those problems are occuring>>> i'm referring to "moving files" and altering permissions on certain components?
    and when you say altering permissions? what do you mean by that?
    is there anyway that I can fix it? or buy a certain software for mac that would fix the system problems? like in windows there are Norton system work
    I was wondering I copy and paste the said command to my terminal but it didn't work. Do you know what would happen to my system if I messed up with that command? >>>im referring to this command http://docs.info.apple.com/article.html?artnum=307354
    Message was edited by: Mac Ken

  • Terminal command for tabs to open in same window

    anyone know the terminal command to have all links open in tabs instead of a new window - why does mac call it tabs when it does not even actually work - any help would be great - i had the command and i deleted it......driving me nuts

    Greetings,
    There is no such command; there is a command to force targeted links to open in new tabs, but it will have no effect on links that are controlled by JavaScript. Open Terminal and enter:
    defaults write com.apple.Safari TargetedClickCreateTabs -bool true
    press Enter or Return, then quit Terminal and restart Safari.

  • I get "App Store Disabled" on my MacBook Pro due to profile issues. What Terminal command can I use to reset profile settings?

    After transferring documents from one MacBook Pro to another I get some weird errors due to settings that seem to have transferred over. One is that the Mac App Store is disabled.
    Are there any Unix / Terminal commands I can use to reset these?

    Forgot Your Account Password
    For Lion/Mountain Lion
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see Reset a Mac OS X 10.7 Lion Password and
         OS X Lion- Apple ID can be used to reset your user account password.

  • How can I change the "Ask to join new networks" option using a terminal command?

    We are currently switching to a new wireless network throughout our school district and I have pushed commands to connect to the new and remove the old. However, any Macs that have "Ask to join new networks" enabled are jumping over to our unsecure guest network, even if that network has been removed from the list of Preferred Networks. So far the fix has been to remove the guest network from the list of Preferred Networks and then disable Ask to join. The only issue I'm running into now is I have been unable to find a terminal command to change this setting. Once I have the command I can write a script and send that out to all of the Macs.
    So is there a way to disable "Ask to join new networks" using command line?

    sed -i "" 's/Prompt/DoNothing/' /Library/Preferences/SystemConfiguration/preferences.plist

Maybe you are looking for

  • Unable to send emails, get error message that access to server is denied...problem began a few days ago

    For the past few days, since the Thunderbird update, I have been unable to send any emails from my thunderbird account. I have also tried going into my juno account online, and any emails that I send out come back with the mailer demon response - tha

  • Film workflow advice

    Hello, I need some workflow advice for a feature film and I would really appreciate some input and technical expertise. I am working with telecined footage from 16mm film and I need to perform reverse telecine with Cinematools so that I can edit the

  • FireWire suddenly not recognising device?

    I have searched high and low for an answer to this and now I'm just plain tired, so I hope someone here can help me in a hurry. I have a Sony DCR-HC15E Camcorder which used to transfer fine in iDVD and burn DVDs for me with no problem at all. Suddenl

  • Why is the latest update maxing out my CPU

    After my Firefix updated the last time to 14.0.1, it has been totally unusable. As soon as it starts it just about maxes out my CPU's. Trying to do anything in it is impossible, menus take 4-5 seconds before they open. If I can get to a web site, try

  • Illustrator CS3 crash in rosetta mode (Snow Leopard)

    Hi, I have a special plugin that only can run on PPC, I try to run Illustrator in rosetta mode but finishes loading and crash.