Search this Website

 

Ubuntu

UNIX

terminal disk space

Category: Ubuntu-Absolute Beginner

terminal disk space?

hi,

is there anyway of checking how much disk space i have left and have used via a linux terminal?.

i have a server pc setup, and i ssh into it from another pc. it has a 10gb (i think)hard-drive for the linux installation, and another 20gb hdd (sure on this one) setup for /home.

thing is i installed torrentflux on the box, set it up to use a folder etc. but it says i've used over 99% of the space and syas 180mb is left on the drive. there is about 16gb of backedup data being stored on a folder in my user name (shared via samba), a 1gb folder in downloads, and a 200mb file being stored on the drive in downloads, there was also a btcurses file being downloaded which would be 1gb tops, and im unsure on how to kill that now.

so i would just like to be able to figure out what's going on with my disk usage, as i will be upgrading to a nice 200gb hard-drive soon, but i want to know how to effectively manage it.


df


hi,

'df' is the command to use. also, 'df -h' will make the numbers more human-readable.

hth,
lambros


if you're using a gnome 2.18 machine locally (i.e., not your server), you can also use the new disk usage analyzer on remote folders. it can go in via ssh, webdav, samba, ftp, and do a remote filesystem scan and give you a nice visual representation of where your space is going. it's way cool and works on servers without a gui quite nicely.


thanks df is working good i think, telling me the same as the program.
now the only other thing is... df doesn't work on folders , how can i check folders stats?.

would use the gnome thing, but alll pcs are still in windows land. ( for stuff that linux and windows both can do nicely, i have linux going on the server, its just better. but games and other stuff i need my windows)


hi,

for folders, the 'du' command might be helpful.

lambros


yep i found that by myself while ls ing lots of folders.

all terminal commadn would be in my /bin? folder
so if i ls it i could randomly check what each does?


yes, there are some commands in the /bin folder. but there's lots of stuff in /usr/bin as well, and other places. you can get the full search-path using the command

code:
echo $pathand that's not all - there are shell "builtins". use

code:
helpto get a list of these.

lambros


additionally you can type

quote:
man commandname

to read the manual for each command
just push q when you're done.