Home > database >  How to find and delete items from a specific drive in Linux
How to find and delete items from a specific drive in Linux

Time:01-25

I have 2 hard drives in my Linux server. One SSD and one HDD. My SSD is currently full and because of that I am not able to run several applications.

Can anyone tell me the exact way in which I can access the files stored in the SSD and delete some of them?

CodePudding user response:

If you know how to open a "Terminal", then you can type a command df -h. The first column lists the disks and the last column shows the directories which are mounted on these disks.

CodePudding user response:

You need to mount it first (if you haven't already):

  • Terminal way:

To list connected disks:

lsblk
sudo mkdir /media/user/disk1
sudo mount /dev/sdXN /media/user/disk1

(replace /dev/sdXN with correct partiton symbol e.g. /dev/sdb1 and user with your username)

  • GUI way:

You can also do it through file explorer, by clicking on drive and it will mount it for you.

If you don't have any file explorer, you can install Nemo (or any other you want) using this command (assuming you are using Debian/Ubuntu/Mint):

sudo apt update
sudo apt install nemo -y

After mounting it you can open this drive (partition) in your file explorer. You also may delete files from terminal using rm command, but I think GUI would be easier.

  •  Tags:  
  • Related