SSH question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • russellg
    Junior Member
    • Mar 2006
    • 28

    SSH question

    How do I recover ...or do I?

    In Putty:
    I used wget http://ftp.drupal.org/files/projects/drupal-6.15.tar.gz
    I then extracted that file.

    To remove I used:
    rm -rf * .tar.gz which wiped out all folders
    I should have used:
    rm -rf *.tar.gz //note the space after * in the first instance.

    [I could delete the account and start over as it was a new installation.
    I just wondered if there was some SSH magic.]
  • ZYV
    Senior Member
    • Sep 2005
    • 315

    #2
    That is exactly the reason why you shouldn't use any obscure switches if you don't know exactly what is the meaning of thereof. If you would not have specified "-rf" it would have left the folders at least.

    There's no magic involved. Unless you are paying for the backup service your best bet would be to recreate the account and be more attentive in the future.

    Comment

    • russellg
      Junior Member
      • Mar 2006
      • 28

      #3
      Thank Sir,
      I was just lazy and somehow left the space there.

      Comment

      • ZYV
        Senior Member
        • Sep 2005
        • 315

        #4
        No-no-no. Space is not essential here. The point is that you used the wrong command with the wrong switches (using the right switches would have minimized the impact though).

        All you had to do is to type "rm dr" and press Tab to evoke autocompletion that would type the rest of the filename for you. If you did it this way there is just no chance for it to go wrong.

        Comment

        • mystic
          Member
          • Nov 2006
          • 59

          #5
          Code:
          rm -rf * .tar.gz // space after *
          removes (rm) recursively (r) and forcefully(i.e (f) all files and folders (*) as well as all files whose name end with .tar.gz


          Code:
          rm -rf *.tar.gz //no space after *
          removes (rm) recursively (r) and forcefully (f) all files whose name end with .tar.gz

          Comment

          Working...