LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-06-2015, 07:52 PM   #1
tharpa
LQ Newbie
 
Registered: Oct 2004
Location: North America
Distribution: Salix
Posts: 20

Rep: Reputation: 3
sda1 - how to see and delete files


My root (?) folder sda1 is getting full. It has only 1 GB free space, and I received a warning about it. Where do I find this in Caja, or how do I browse it so I can see what I can delete?
 
Old 03-06-2015, 08:38 PM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
You can browse the partition if it's mounted.

If you're using a desktop, just navigate to the partition.

If you're using a terminal just run the ls command to get a view of each directory. You can use the chdir command to change to each appropriate directory listed (use a context of /path/to/directory to move into directories and use the double period ".." to go back out of directories: example "chdir .." would move you out of a directory). Remember to use the name of the directory without a / symbol or you may move to the /(root) directory. Once you've located the culprit files and/or directories (using ls with a variable like -s), use "rm -rf name of file" to delete and remove the files or directories as needed, but take care to inspect each file before removal.

Hope this helps.

Last edited by ReaperX7; 03-06-2015 at 08:39 PM.
 
Old 03-06-2015, 08:54 PM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If you run the following, it will tell you what size each sub folders contains sorted largest to smallest. Then you can change directories (using the cd command, I think ReaperX7 mistyped when he wrote chdir) into one of the sub directories and run the command again.

Code:
du -hd 1 | sort -hr
 
Old 03-06-2015, 08:59 PM   #4
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
Correcting this problem can depend widely on your partition scheme. Could you post the output of
Code:
df -h
?
 
Old 03-06-2015, 09:11 PM   #5
tharpa
LQ Newbie
 
Registered: Oct 2004
Location: North America
Distribution: Salix
Posts: 20

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by ReaperX7 View Post
You can browse the partition if it's mounted.

If you're using a desktop, just navigate to the partition.

If you're using a terminal just run the ls command to get a view of each directory. You can use the chdir command to change to each appropriate directory listed (use a context of /path/to/directory to move into directories and use the double period ".." to go back out of directories: example "chdir .." would move you out of a directory). Remember to use the name of the directory without a / symbol or you may move to the /(root) directory. Once you've located the culprit files and/or directories (using ls with a variable like -s), use "rm -rf name of file" to delete and remove the files or directories as needed, but take care to inspect each file before removal.

Hope this helps.
Thanks, Reaper, but what I really need is to know where it is. For example, I thought maybe I could go to /mnt/sda1 and see it, but there is no such folder. What is the "address" that I would need to go to to see sda1? I also looked at /dev/sda1, but I am told that it is not a directory.
 
Old 03-06-2015, 09:13 PM   #6
tharpa
LQ Newbie
 
Registered: Oct 2004
Location: North America
Distribution: Salix
Posts: 20

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by slacker1337 View Post
Correcting this problem can depend widely on your partition scheme. Could you post the output of
Code:
df -h
?
sda1 is the one I am concerned about, so that is the one I am posting below.

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 15G 14G 1.1G 93% /
 
Old 03-06-2015, 09:16 PM   #7
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Read the results of the command "man du" with emphasis upon the -x or --one-file-system option.
 
Old 03-06-2015, 09:20 PM   #8
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
Well, to simply answer your question, the root folder is:
Code:
/
.

Unfortunately, depending on your partition scheme, the full output of the command I mentioned in my previous post is necessary to correct your problem. Because, if you installed Slackware entirely on /dev/sda1, then your options to correct your problem will be different than if you dedicated a separate partition for other directories, such as /home, /usr, /var, /srv, and others...
 
Old 03-06-2015, 09:30 PM   #9
tharpa
LQ Newbie
 
Registered: Oct 2004
Location: North America
Distribution: Salix
Posts: 20

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by slacker1337 View Post
Well, to simply answer your question, the root folder is:
Code:
/
.

Unfortunately, depending on your partition scheme, the full output of the command I mentioned in my previous post is necessary to correct your problem. Because, if you installed Slackware entirely on /dev/sda1, then your options to correct your problem will be different than if you dedicated a separate partition for other directories, such as /home, /usr, /var, /srv, and others...
tharpa[dev]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 15G 14G 1.1G 93% /
/dev/sda3 218G 48G 170G 22% /home
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sdc1 932G 210G 723G 23% /run/media/tharpa/My Passport
 
Old 03-06-2015, 10:27 PM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
In that case, look for any large files that aren't in the /home and /run/media/tharpa directories. Which the appropriate du command would tell you.
 
Old 03-06-2015, 10:29 PM   #11
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
BTW, what the devil is Caja? A quick google search didn't point to anything that I thought would remotely apply to this issue.
 
Old 03-06-2015, 10:43 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Your search foo must be weak
Quote:
Originally Posted by mate_desktop
Applications

MATE is composed of a number of applications. The renaming is necessary to avoid conflicts with GNOME components.
Caja

Caja is the official file manager for the MATE desktop. It allows for browsing directories, as well as previewing files and launching applications associated with them. It is also responsible for handling the icons on the MATE desktop. It works on local and remote filesystems. Caja is a fork of Nautilus.
 
Old 03-06-2015, 10:47 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by tharpa View Post
sda1 is the one I am concerned about, so that is the one I am posting below.
Try this - start with the largest directory(s). You can use a similar command descending into the big guys (drop the -d 1 in the dirs)
Code:
du / -d 1 -xh | sort -rh
 
Old 03-07-2015, 04:02 AM   #14
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,493

Rep: Reputation: Disabled
Sounds like you just need to browse to the 'filesystem', which will show you /.
(That is what/where most file managers call /.)
 
Old 03-07-2015, 04:20 AM   #15
tharpa
LQ Newbie
 
Registered: Oct 2004
Location: North America
Distribution: Salix
Posts: 20

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by bassmadrigal View Post
If you run the following, it will tell you what size each sub folders contains sorted largest to smallest. Then you can change directories (using the cd command, I think ReaperX7 mistyped when he wrote chdir) into one of the sub directories and run the command again.

Code:
du -hd 1 | sort -hr
Will this only give the results for sda1? (That's what I'm looking for.) This looks like this gives the results for my whole hard drive. (Which appears to be called SDA1 is only 14 GB total, so I'm thinking that must be some sort of system partition?
 
  


Reply

Tags
salix



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Technical question: /dev/sda1 vs /mnt/sda1 macnab Linux - Newbie 5 01-03-2012 04:58 AM
Does chown user /mnt/sda1 make sda1 writeable over network? macnab Linux - Newbie 7 12-30-2011 02:25 AM
Need to resize sda1 but sda2 & sda3 is between sda1 and unallocated space. tony128 Linux - Newbie 6 09-13-2010 12:15 AM
Can I delete files in /mnt/tmp? and Files in the trash can will not delete? M$ISBS Slackware 15 10-02-2009 11:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration