Accidentally deleted everything from a directory on my Macbook using terminalWhat tools exist to recover a file I clobbered using cpp in terminal?How can I do a fresh install of OSX Mountain Lion onto my SSD for my Macbook?Restore Mac from Time Machine Backup via TerminalOSX: How to backup personal data via CLI script or commandHow can I move files or directories marked as a backup?Can Time Machine restore an erased drive?Does Time Machine back up potentially corrupted files?Cannot restore Time Machine backup to internal HDDUsing mv to rename files on terminal ended up with lost filesHow can change broken file permissions of Time Machine backups?

8086 stack segment and avoiding overflow in interrupts

Why did I lose on time with 3 pawns vs Knight. Shouldn't it be a draw?

How does a poisoned arrow combine with the spell Conjure Barrage?

If you inherit a Roth 401(k), is it taxed?

What would the United Kingdom's "optimal" Brexit deal look like?

Should I intervene when a colleague in a different department makes students run laps as part of their grade?

Why would an invisible personal shield be necessary?

Do 3/8 (37.5%) of Quadratics Have No x-Intercepts?

Just how much information should you share with a former client?

What is more environmentally friendly? An A320 or a car?

Microgravity indicators

How to store my pliers and wire cutters on my desk?

Why does the Eurostar not show youth pricing?

Why did House of Representatives need to condemn Trumps Tweets?

Boots or trail runners with reference to blisters?

Convert graph format for Mathematica graph functions

Polynomial satisfying a relation for all positive integers

Piece of chess engine, which accomplishes move generation

What is the reason for cards stating "Until end of turn, you don't lose this mana as steps and phases end"?

How to have poached eggs in "sphere form"?

What force enables us to walk? Friction or normal reaction?

90s/2000s TV show : man uses government time machine to fix national problems

Self-deportation of American Citizens from US

Is there an antonym (a complementary antonym) for "spicy" or "hot" regarding food (I DO NOT mean "seasoned", but "hot")?



Accidentally deleted everything from a directory on my Macbook using terminal


What tools exist to recover a file I clobbered using cpp in terminal?How can I do a fresh install of OSX Mountain Lion onto my SSD for my Macbook?Restore Mac from Time Machine Backup via TerminalOSX: How to backup personal data via CLI script or commandHow can I move files or directories marked as a backup?Can Time Machine restore an erased drive?Does Time Machine back up potentially corrupted files?Cannot restore Time Machine backup to internal HDDUsing mv to rename files on terminal ended up with lost filesHow can change broken file permissions of Time Machine backups?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I accidentally did a rm -rf * on a wrong directory on my macbook terminal. It appears that the rm command operates just like on a Linux system, where it's irreversible.



But I did back up my Mac to my external HDD so I can restore it using Time Machine, but I wanted to see if anyone knows of another, preferably quicker way to get all of my files back in the directory I used the above command in?










share|improve this question






























    3















    I accidentally did a rm -rf * on a wrong directory on my macbook terminal. It appears that the rm command operates just like on a Linux system, where it's irreversible.



    But I did back up my Mac to my external HDD so I can restore it using Time Machine, but I wanted to see if anyone knows of another, preferably quicker way to get all of my files back in the directory I used the above command in?










    share|improve this question


























      3












      3








      3








      I accidentally did a rm -rf * on a wrong directory on my macbook terminal. It appears that the rm command operates just like on a Linux system, where it's irreversible.



      But I did back up my Mac to my external HDD so I can restore it using Time Machine, but I wanted to see if anyone knows of another, preferably quicker way to get all of my files back in the directory I used the above command in?










      share|improve this question














      I accidentally did a rm -rf * on a wrong directory on my macbook terminal. It appears that the rm command operates just like on a Linux system, where it's irreversible.



      But I did back up my Mac to my external HDD so I can restore it using Time Machine, but I wanted to see if anyone knows of another, preferably quicker way to get all of my files back in the directory I used the above command in?







      macbook terminal time-machine trash






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 9 hours ago









      IamanonIamanon

      373 bronze badges




      373 bronze badges























          3 Answers
          3






          active

          oldest

          votes


















          7














          Restoring from backup is the way to go here, there is no magic „undo rm -rf“ command.






          share|improve this answer
































            4














            You do not need to restore your whole machine. You need to restore only one folder. Time machine is much faster than I assume. Seems like a big deal to me since I've been trained never to relay on backup.



            Just crank up Time Machine and copy the folder, in which you deleted all the content, back to where ever you had it. I had to go back a level in TimeMachine's display before the restore button became active.



            Of course, you you could be missing the absolute latest changes.



            enter image description here



            Pick what folder you want to restore. I picked my numbers folder.



            enter image description here



            result:
            enter image description here



            PS:
            I do not recommend deleting directories from the terminal. It's safer from finder. I've added the following alias to my bash profile.



            alias cp='cp -i'
            alias mv='mv -i'
            alias rm='rm -i'


            Run these as see how they go. Once you have establish they are delete the correct files, use control + c to quit. Then repeat with a backslash in front of the command to nix the alias version of the command. Aliases do not hold with sudo.






            share|improve this answer


































              1














              Copying from a backup is much more efficient than anything. If you want to take the hard route, stop using your operating system immediately and look into using testdisk on it from an external OS installation.



              For backing up from your time machine drive do the following:



              Plug in your time machine backup, and then open up terminal.



              Open up two finder windows. In one window, navigate to the deleted directory on your local hard drive. In the other finder window, navigate to the same directory (your backup copy) in the time machine hard drive.



              Go back to terminal and type:cp -R
              then go to your time machine directory folder that is your backup copy, and drag it to the terminal. For example if you did rm -rf* ~/Downloads/ or rm -rf* /Users/Myhomefolder/Downloads/



              your terminal should now look like this:



              $`cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads`


              then enter /* and a space.



              Next drag go to the original deleted directory in your local drive using finder, and drag that folder to the terminal.



              your terminal should now look like this:



              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads



              then press backspace to line your curser next to the last letter in the terminal, and type /.



              The final command in your terminal should look like this:



              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads/



              If you originally deleted a protected folder in root, the be sure to enter $sudo in the terminal before entering the command.



              Be sure you have the correct command and directories, then press enter to run the command. The back up will now copy to your hard drive.






              share|improve this answer

























              • Are you sure about the paths on the TimeMachine volume, shouldn’t there be a version/date in it? Also, restoring via command line copies any extended attributes added by Time Machine back onto your main drive which you should remove afterwards to avoid strange access/permission issues later on.

                – nohillside
                2 hours ago




















              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              7














              Restoring from backup is the way to go here, there is no magic „undo rm -rf“ command.






              share|improve this answer





























                7














                Restoring from backup is the way to go here, there is no magic „undo rm -rf“ command.






                share|improve this answer



























                  7












                  7








                  7







                  Restoring from backup is the way to go here, there is no magic „undo rm -rf“ command.






                  share|improve this answer













                  Restoring from backup is the way to go here, there is no magic „undo rm -rf“ command.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 9 hours ago









                  nohillsidenohillside

                  55.5k14 gold badges116 silver badges165 bronze badges




                  55.5k14 gold badges116 silver badges165 bronze badges


























                      4














                      You do not need to restore your whole machine. You need to restore only one folder. Time machine is much faster than I assume. Seems like a big deal to me since I've been trained never to relay on backup.



                      Just crank up Time Machine and copy the folder, in which you deleted all the content, back to where ever you had it. I had to go back a level in TimeMachine's display before the restore button became active.



                      Of course, you you could be missing the absolute latest changes.



                      enter image description here



                      Pick what folder you want to restore. I picked my numbers folder.



                      enter image description here



                      result:
                      enter image description here



                      PS:
                      I do not recommend deleting directories from the terminal. It's safer from finder. I've added the following alias to my bash profile.



                      alias cp='cp -i'
                      alias mv='mv -i'
                      alias rm='rm -i'


                      Run these as see how they go. Once you have establish they are delete the correct files, use control + c to quit. Then repeat with a backslash in front of the command to nix the alias version of the command. Aliases do not hold with sudo.






                      share|improve this answer































                        4














                        You do not need to restore your whole machine. You need to restore only one folder. Time machine is much faster than I assume. Seems like a big deal to me since I've been trained never to relay on backup.



                        Just crank up Time Machine and copy the folder, in which you deleted all the content, back to where ever you had it. I had to go back a level in TimeMachine's display before the restore button became active.



                        Of course, you you could be missing the absolute latest changes.



                        enter image description here



                        Pick what folder you want to restore. I picked my numbers folder.



                        enter image description here



                        result:
                        enter image description here



                        PS:
                        I do not recommend deleting directories from the terminal. It's safer from finder. I've added the following alias to my bash profile.



                        alias cp='cp -i'
                        alias mv='mv -i'
                        alias rm='rm -i'


                        Run these as see how they go. Once you have establish they are delete the correct files, use control + c to quit. Then repeat with a backslash in front of the command to nix the alias version of the command. Aliases do not hold with sudo.






                        share|improve this answer





























                          4












                          4








                          4







                          You do not need to restore your whole machine. You need to restore only one folder. Time machine is much faster than I assume. Seems like a big deal to me since I've been trained never to relay on backup.



                          Just crank up Time Machine and copy the folder, in which you deleted all the content, back to where ever you had it. I had to go back a level in TimeMachine's display before the restore button became active.



                          Of course, you you could be missing the absolute latest changes.



                          enter image description here



                          Pick what folder you want to restore. I picked my numbers folder.



                          enter image description here



                          result:
                          enter image description here



                          PS:
                          I do not recommend deleting directories from the terminal. It's safer from finder. I've added the following alias to my bash profile.



                          alias cp='cp -i'
                          alias mv='mv -i'
                          alias rm='rm -i'


                          Run these as see how they go. Once you have establish they are delete the correct files, use control + c to quit. Then repeat with a backslash in front of the command to nix the alias version of the command. Aliases do not hold with sudo.






                          share|improve this answer















                          You do not need to restore your whole machine. You need to restore only one folder. Time machine is much faster than I assume. Seems like a big deal to me since I've been trained never to relay on backup.



                          Just crank up Time Machine and copy the folder, in which you deleted all the content, back to where ever you had it. I had to go back a level in TimeMachine's display before the restore button became active.



                          Of course, you you could be missing the absolute latest changes.



                          enter image description here



                          Pick what folder you want to restore. I picked my numbers folder.



                          enter image description here



                          result:
                          enter image description here



                          PS:
                          I do not recommend deleting directories from the terminal. It's safer from finder. I've added the following alias to my bash profile.



                          alias cp='cp -i'
                          alias mv='mv -i'
                          alias rm='rm -i'


                          Run these as see how they go. Once you have establish they are delete the correct files, use control + c to quit. Then repeat with a backslash in front of the command to nix the alias version of the command. Aliases do not hold with sudo.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited 8 hours ago

























                          answered 8 hours ago









                          historystamphistorystamp

                          1,2597 silver badges11 bronze badges




                          1,2597 silver badges11 bronze badges
























                              1














                              Copying from a backup is much more efficient than anything. If you want to take the hard route, stop using your operating system immediately and look into using testdisk on it from an external OS installation.



                              For backing up from your time machine drive do the following:



                              Plug in your time machine backup, and then open up terminal.



                              Open up two finder windows. In one window, navigate to the deleted directory on your local hard drive. In the other finder window, navigate to the same directory (your backup copy) in the time machine hard drive.



                              Go back to terminal and type:cp -R
                              then go to your time machine directory folder that is your backup copy, and drag it to the terminal. For example if you did rm -rf* ~/Downloads/ or rm -rf* /Users/Myhomefolder/Downloads/



                              your terminal should now look like this:



                              $`cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads`


                              then enter /* and a space.



                              Next drag go to the original deleted directory in your local drive using finder, and drag that folder to the terminal.



                              your terminal should now look like this:



                              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads



                              then press backspace to line your curser next to the last letter in the terminal, and type /.



                              The final command in your terminal should look like this:



                              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads/



                              If you originally deleted a protected folder in root, the be sure to enter $sudo in the terminal before entering the command.



                              Be sure you have the correct command and directories, then press enter to run the command. The back up will now copy to your hard drive.






                              share|improve this answer

























                              • Are you sure about the paths on the TimeMachine volume, shouldn’t there be a version/date in it? Also, restoring via command line copies any extended attributes added by Time Machine back onto your main drive which you should remove afterwards to avoid strange access/permission issues later on.

                                – nohillside
                                2 hours ago















                              1














                              Copying from a backup is much more efficient than anything. If you want to take the hard route, stop using your operating system immediately and look into using testdisk on it from an external OS installation.



                              For backing up from your time machine drive do the following:



                              Plug in your time machine backup, and then open up terminal.



                              Open up two finder windows. In one window, navigate to the deleted directory on your local hard drive. In the other finder window, navigate to the same directory (your backup copy) in the time machine hard drive.



                              Go back to terminal and type:cp -R
                              then go to your time machine directory folder that is your backup copy, and drag it to the terminal. For example if you did rm -rf* ~/Downloads/ or rm -rf* /Users/Myhomefolder/Downloads/



                              your terminal should now look like this:



                              $`cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads`


                              then enter /* and a space.



                              Next drag go to the original deleted directory in your local drive using finder, and drag that folder to the terminal.



                              your terminal should now look like this:



                              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads



                              then press backspace to line your curser next to the last letter in the terminal, and type /.



                              The final command in your terminal should look like this:



                              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads/



                              If you originally deleted a protected folder in root, the be sure to enter $sudo in the terminal before entering the command.



                              Be sure you have the correct command and directories, then press enter to run the command. The back up will now copy to your hard drive.






                              share|improve this answer

























                              • Are you sure about the paths on the TimeMachine volume, shouldn’t there be a version/date in it? Also, restoring via command line copies any extended attributes added by Time Machine back onto your main drive which you should remove afterwards to avoid strange access/permission issues later on.

                                – nohillside
                                2 hours ago













                              1












                              1








                              1







                              Copying from a backup is much more efficient than anything. If you want to take the hard route, stop using your operating system immediately and look into using testdisk on it from an external OS installation.



                              For backing up from your time machine drive do the following:



                              Plug in your time machine backup, and then open up terminal.



                              Open up two finder windows. In one window, navigate to the deleted directory on your local hard drive. In the other finder window, navigate to the same directory (your backup copy) in the time machine hard drive.



                              Go back to terminal and type:cp -R
                              then go to your time machine directory folder that is your backup copy, and drag it to the terminal. For example if you did rm -rf* ~/Downloads/ or rm -rf* /Users/Myhomefolder/Downloads/



                              your terminal should now look like this:



                              $`cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads`


                              then enter /* and a space.



                              Next drag go to the original deleted directory in your local drive using finder, and drag that folder to the terminal.



                              your terminal should now look like this:



                              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads



                              then press backspace to line your curser next to the last letter in the terminal, and type /.



                              The final command in your terminal should look like this:



                              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads/



                              If you originally deleted a protected folder in root, the be sure to enter $sudo in the terminal before entering the command.



                              Be sure you have the correct command and directories, then press enter to run the command. The back up will now copy to your hard drive.






                              share|improve this answer













                              Copying from a backup is much more efficient than anything. If you want to take the hard route, stop using your operating system immediately and look into using testdisk on it from an external OS installation.



                              For backing up from your time machine drive do the following:



                              Plug in your time machine backup, and then open up terminal.



                              Open up two finder windows. In one window, navigate to the deleted directory on your local hard drive. In the other finder window, navigate to the same directory (your backup copy) in the time machine hard drive.



                              Go back to terminal and type:cp -R
                              then go to your time machine directory folder that is your backup copy, and drag it to the terminal. For example if you did rm -rf* ~/Downloads/ or rm -rf* /Users/Myhomefolder/Downloads/



                              your terminal should now look like this:



                              $`cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads`


                              then enter /* and a space.



                              Next drag go to the original deleted directory in your local drive using finder, and drag that folder to the terminal.



                              your terminal should now look like this:



                              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads



                              then press backspace to line your curser next to the last letter in the terminal, and type /.



                              The final command in your terminal should look like this:



                              $cp -R /Volumes/TimeMachineHD/Users/Myhomefolder/Downloads/* /Users/Myhomefoldername/Downloads/



                              If you originally deleted a protected folder in root, the be sure to enter $sudo in the terminal before entering the command.



                              Be sure you have the correct command and directories, then press enter to run the command. The back up will now copy to your hard drive.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered 7 hours ago









                              DanRanDanRan

                              1798 bronze badges




                              1798 bronze badges















                              • Are you sure about the paths on the TimeMachine volume, shouldn’t there be a version/date in it? Also, restoring via command line copies any extended attributes added by Time Machine back onto your main drive which you should remove afterwards to avoid strange access/permission issues later on.

                                – nohillside
                                2 hours ago

















                              • Are you sure about the paths on the TimeMachine volume, shouldn’t there be a version/date in it? Also, restoring via command line copies any extended attributes added by Time Machine back onto your main drive which you should remove afterwards to avoid strange access/permission issues later on.

                                – nohillside
                                2 hours ago
















                              Are you sure about the paths on the TimeMachine volume, shouldn’t there be a version/date in it? Also, restoring via command line copies any extended attributes added by Time Machine back onto your main drive which you should remove afterwards to avoid strange access/permission issues later on.

                              – nohillside
                              2 hours ago





                              Are you sure about the paths on the TimeMachine volume, shouldn’t there be a version/date in it? Also, restoring via command line copies any extended attributes added by Time Machine back onto your main drive which you should remove afterwards to avoid strange access/permission issues later on.

                              – nohillside
                              2 hours ago



                              Popular posts from this blog

                              Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                              Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                              Tom Holland Mục lục Đầu đời và giáo dục | Sự nghiệp | Cuộc sống cá nhân | Phim tham gia | Giải thưởng và đề cử | Chú thích | Liên kết ngoài | Trình đơn chuyển hướngProfile“Person Details for Thomas Stanley Holland, "England and Wales Birth Registration Index, 1837-2008" — FamilySearch.org”"Meet Tom Holland... the 16-year-old star of The Impossible""Schoolboy actor Tom Holland finds himself in Oscar contention for role in tsunami drama"“Naomi Watts on the Prince William and Harry's reaction to her film about the late Princess Diana”lưu trữ"Holland and Pflueger Are West End's Two New 'Billy Elliots'""I'm so envious of my son, the movie star! British writer Dominic Holland's spent 20 years trying to crack Hollywood - but he's been beaten to it by a very unlikely rival"“Richard and Margaret Povey of Jersey, Channel Islands, UK: Information about Thomas Stanley Holland”"Tom Holland to play Billy Elliot""New Billy Elliot leaving the garage"Billy Elliot the Musical - Tom Holland - Billy"A Tale of four Billys: Tom Holland""The Feel Good Factor""Thames Christian College schoolboys join Myleene Klass for The Feelgood Factor""Government launches £600,000 arts bursaries pilot""BILLY's Chapman, Holland, Gardner & Jackson-Keen Visit Prime Minister""Elton John 'blown away' by Billy Elliot fifth birthday" (video with John's interview and fragments of Holland's performance)"First News interviews Arrietty's Tom Holland"“33rd Critics' Circle Film Awards winners”“National Board of Review Current Awards”Bản gốc"Ron Howard Whaling Tale 'In The Heart Of The Sea' Casts Tom Holland"“'Spider-Man' Finds Tom Holland to Star as New Web-Slinger”lưu trữ“Captain America: Civil War (2016)”“Film Review: ‘Captain America: Civil War’”lưu trữ“‘Captain America: Civil War’ review: Choose your own avenger”lưu trữ“The Lost City of Z reviews”“Sony Pictures and Marvel Studios Find Their 'Spider-Man' Star and Director”“‘Mary Magdalene’, ‘Current War’ & ‘Wind River’ Get 2017 Release Dates From Weinstein”“Lionsgate Unleashing Daisy Ridley & Tom Holland Starrer ‘Chaos Walking’ In Cannes”“PTA's 'Master' Leads Chicago Film Critics Nominations, UPDATED: Houston and Indiana Critics Nominations”“Nominaciones Goya 2013 Telecinco Cinema – ENG”“Jameson Empire Film Awards: Martin Freeman wins best actor for performance in The Hobbit”“34th Annual Young Artist Awards”Bản gốc“Teen Choice Awards 2016—Captain America: Civil War Leads Second Wave of Nominations”“BAFTA Film Award Nominations: ‘La La Land’ Leads Race”“Saturn Awards Nominations 2017: 'Rogue One,' 'Walking Dead' Lead”Tom HollandTom HollandTom HollandTom Hollandmedia.gettyimages.comWorldCat Identities300279794no20130442900000 0004 0355 42791085670554170004732cb16706349t(data)XX5557367