Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    1,016

    Deleting a Directory in SSH

    Yes, I know about the #rm -r [dir] command, but it asks for confirmation on each and every file deletion

    Is there a command to delete a directory and its contents completely without confirming on each file?

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,616
    rm -rf [dir]

    This will stop the confirmation but please be careful. To many people have nuked servers typing that wrong

    rus
    Russ Foster - Industry Curmudgeon
    Freelance Sysadmin for Hire - email vaserv@gmail.com

  3. #3
    Join Date
    Mar 2003
    Location
    /root
    Posts
    23,991
    This is the powerful command ever!!! :-)

    Specially 4 U
    Reseller Hosting: Boost Your Websites | Fully Managed KVM VPS: 3.20 - 5.00 Ghz, Pure Dedicated Power
    JoneSolutions.Com is on the net 24/7 providing stable and reliable web hosting solutions, server management and services since 2001
    Debian|Ubuntu|cPanel|DirectAdmin|Enhance|Webuzo|Acronis|Estela|BitNinja|Nginx

  4. #4
    Join Date
    Mar 2004
    Posts
    1,016
    Thanks! It worked!

    Yes, I won't use it too often.

  5. #5
    I very scared this command , be careful when using it !!!
    ServerVina.com | Sales@servervina.com
    YM: servervina | AIM: servervina
    Lowest prices for Unmetered and Metered bandwidth.

  6. #6
    Join Date
    Jan 2005
    Posts
    2,203
    should have a script to prevent accidental nuke of the server using that command.

Posting Permissions

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