Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    1

    Default delete backup files using putty

    How can I delete back up files using putty (SSH). I want to know the commands.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2008
    Location
    PK
    Posts
    443

    Default

    Quote Originally Posted by indous View Post
    How can I delete back up files using putty (SSH). I want to know the commands.
    What kind of backup files do you want to delete. Go to the folder where the backup files are located using the command below.

    cd /path/to/backup/folder/

    The command below will delete the file named 'backup-file'.

    rm backup-file
    1 solution works for all problems. Trying harder!
    HostMasterTips - Understanding Tech Support

  3. #3
    Member
    Join Date
    Oct 2006
    Location
    Penang, Malaysia
    Posts
    56

    Default

    you may use rm to remove a file.

    rm remove file
    rm -r remove file with recursive
    rm -f force remove

    normally backup file located at /backup/cpbackup/.

  4. #4
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb Removing files via command-line (CLI) SSH access

    Quote Originally Posted by indous View Post
    How can I delete back up files using putty (SSH). I want to know the commands.
    Please use the following command to review the official manual "man" page for the "rm" utility:
    Code:
    # man rm
    Via SSH, the "rm" command could be used; however, this must be done so carefully so as to not inadvertently remove important or required data.

    The command-line (CLI) switch "-r" should only be used if needing to "recursively" remove a directory and all of the contents within that directory. As a safety precaution, I recommend to not use this option unless absolutely required for removing an entire directory structure and its contents.

    The CLI switch "-v"may be used to enable verbose output that will explain what is being done, such as indicating when a file is removed. I recommend using this option so that there will be a more visual record of what actions are performed, excellent for copying-and-pasting.

    The CLI switch "-f" may be used if needing to force the removal without prompting and ignoring nonexistent files.

    The CLI switch "-i" may be used if needing to interactively confirm the removal of each file by answering a prompt for yes or no; this may be a desired option to use if there is any uncertainty involved in what is needing to be removed.

    The following example could be used to forcefully remove a file named "backupfile.tar.gz" that is located in the same directory that you're currently in (where "backupfile.tar.gz" should be replaced with the actual file name involved):
    Code:
    # rm -fv backupfile.tar.gz
    The following example could be used to interactively remove a file named "backupfile.tar.gz" located in a directory path of "/path/to/" (where "/path/to/backupfile.tar.gz" should be replaced by the actual directory path and file name of the file to remove):
    Code:
    # rm -iv /path/to/backupfile.tar.gz

  5. #5
    Registered User
    Join Date
    Sep 2010
    Posts
    1

    Default

    Hi there, I used tht command on ssh & nothing happend, where the error?

  6. #6
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by lanka View Post
    Hi there, I used tht command on ssh & nothing happend, where the error?
    Multiple commands were discussed in this thread. Please clarify exactly what command was used and what you were expecting to happen using the specific command.

    The following command may be used to obtain a history of the commands entered for the user you are logged-in as:
    Code:
    # history

Similar Threads & Tags
Similar threads

  1. (please help)Can't Delete files
    By evilgenius in forum New User Questions
    Replies: 1
    Last Post: 11-15-2010, 05:37 AM
  2. Replies: 0
    Last Post: 12-02-2008, 02:04 PM
  3. Delete Putty Private Key
    By sparek-3 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-05-2008, 11:24 AM
  4. Download Files Using SSH & Putty
    By Supafly in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 03-18-2006, 07:36 AM
  5. Backup restore error on Putty ?
    By Mike1984 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-19-2003, 08:23 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube