Results 1 to 5 of 5

Thread: SSH question

  1. #1
    Junior Member russellg's Avatar
    Join Date
    Mar 2006
    Posts
    28

    Default 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.]

  2. #2
    Senior Member
    Join Date
    Sep 2005
    Location
    Russia, Nizhny Novgorod
    Posts
    315

    Default

    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.

  3. #3
    Junior Member russellg's Avatar
    Join Date
    Mar 2006
    Posts
    28

    Default

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

  4. #4
    Senior Member
    Join Date
    Sep 2005
    Location
    Russia, Nizhny Novgorod
    Posts
    315

    Default

    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.

  5. #5
    Member
    Join Date
    Nov 2006
    Posts
    59

    Default

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •