
Originally Posted by
indous
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:
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