LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   knowing the disk space (https://www.linuxquestions.org/questions/linux-software-2/knowing-the-disk-space-154747/)

vidyaraj 03-07-2004 06:54 PM

knowing the disk space
 
Dear sir,
What is the command i need to use to know the disk space!!!!!!!
suppose for example if my disk is full what are the possible files I can delete.

is there any commands there !!!!!! if so i would like to know the command.
for example if i browse internet, in windows normally we remove all the files in temporary internet files, in suse 8.1 linux from which directory, where i can remove my files.
can remove the file messages in the path like /var/local/messages which is having the log information
thanks
vidyaraj

jtshaw 03-07-2004 06:59 PM

df shows a list of all file systems and there used/avail space (df -h shows in "human readable form")

example
Code:

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hde3              38G  9.0G  29G  24% /
/dev/hde4              74G  18G  56G  25% /home
/dev/hdg1              38G  26G  13G  68% /extra

Also, du will show the disk usage of a file or directory. I like to use the -hs switch which makes it "human redable" (h) and prints only the summary (s).
Example:
Code:

du -hs /usr/src
281M    /usr/src/


fancypiper 03-07-2004 07:48 PM

Re: knowing the disk space
 
Quote:

Originally posted by vidyaraj

suppose for example if my disk is full what are the possible files I can delete.

is there any commands there !!!!!! if so i would like to know the command.
for example if i browse internet, in windows normally we remove all the files in temporary internet files, in suse 8.1 linux from which directory, where i can remove my files.
can remove the file messages in the path like /var/local/messages which is having the log information
thanks
vidyaraj

I would delete the rotated logs something.<N>, (the <N> represents a number after the dot) except for the ksyms.<N> files. Your web browser should have an option to empty the cache, it will be somewhere in your /home/<user> directory, usually under some folder that may be hidden (start with a .) but will have cache in the name. An example in my case would be:

/home/fancy/.mozilla/default/mi7n1khj.slt/Cache

Removal commands
Remove directory, all folders and files and don't ask any questions about it, just do it:
rm -rf /path/to/directory
rm -R /path/to/directory
Remove a file:
rm /path/to/file

heema 03-07-2004 07:59 PM

or if u use kde there is KDiskFree
and there is a program called Filelight to show u graphically each folder is taking how much disk space

Thymox 03-08-2004 04:54 AM

There is also a programme called xdf that recursively scans the specified directory and presents you with a nice chart of what subdirs use how much space, sorted in order of size. It doesn't have any options what-so-ever to remove files, etc, etc, because that is the domain of a filemanager (or the command line), but it does do a good job at simply showing you your disk usage on a directory-by-directory basis.

sergeantroach 03-08-2004 07:33 AM

Just type KDF in Konsole.


All times are GMT -5. The time now is 11:52 PM.