Search This Blog

Tuesday 15 July 2014

How to delete files from a QNAP NAS using SSH

Sometimes a QNAP NAS can get so full you cannot access it via SMB or delete files via the Web Management. Here is how to remove files via SSH.

Login to the Device via SSH using putty

media_1397129217652.png
Open putty and connect to the NAS via the Management IP address using SSH

Login

media_1397129239523.png
Login to the device with Admin User only

List the Mount Points

media_1397129646501.png
Use the command df to show the mount points on the disks. On a QNAP NAS look for the folders /share/MD0_DATA

Change Folder

media_1397129728042.png
Use the command cd /share/MD0_DATA to change to that folder

Show Shares

media_1397129733495.png
You now show the shares on your QNAP NAS with the command ls

Change to Folder to be Deleted

media_1397129750088.png
To delete a folder, change to the parent folder and then you are ready for remove the folders and files

Remove Folders

media_1397131147295.png
You can then remove the folders and files with the command
rm -rf /share/MD0_DATA/ShareName/Folder

Confirm the Disk Space Reduction

media_1397129898597.png
In the Web Management GUI you can now confirm the disk space as it reduces

2 comments:

  1. Thanks to sharing.. its useful for users

    IT Network Solutionsa

    ReplyDelete
  2. The problem is that in the "File Station" the folder is still visible

    ReplyDelete