LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-05-2013, 09:53 AM   #1
mycuser
LQ Newbie
 
Registered: Apr 2013
Location: Ste-Marcelline Quebec Canada
Distribution: ubuntu
Posts: 9

Rep: Reputation: Disabled
Question about bash command du


Hello eveyone,
if there is a howto, pls point me to it.
I'm running ubuntu 12.04 and trying to find out disk usage and byte free from the command line.

Thanks in advance,

Michel Chassey
 
Old 04-05-2013, 09:58 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
run "man du" and read. It's a very very small simple command, what are you struggling with?
 
Old 04-05-2013, 10:40 AM   #3
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 516

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by mycuser View Post
I'm running ubuntu 12.04 and trying to find out disk usage and byte free from the command line.
you probably want df

Code:
# df -h --total
 
Old 04-05-2013, 10:53 AM   #4
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
du stands for disk usage and df for disk free. du command will return file sizes and df will return file system size information. And as already suggested, all you need is to thoroughly read manuals of both commands and let's know if you stuck somewhere.
Code:
~$ man du
~$ man df
 
Old 04-05-2013, 01:11 PM   #5
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,667
Blog Entries: 10

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
I'm an admin, I need Type in mine, so I aliased this:
Code:
df -hT
 
Old 04-05-2013, 01:55 PM   #6
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 516

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by Habitual View Post
I'm an admin, I need Type in mine, so I aliased this:
Code:
df -hT
you could also use column to show each in 1 line, if you use lvm and have long volume group-logical volume names

Code:
$ df -hTP --total | column -t

Last edited by mddnix; 04-05-2013 at 02:01 PM.
 
Old 04-05-2013, 07:34 PM   #7
mycuser
LQ Newbie
 
Registered: Apr 2013
Location: Ste-Marcelline Quebec Canada
Distribution: ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks to all for speedy and to the point replies. du and df disk usage and disk free I learn something every day.

Michel Chassey

PS at least you spared me the RTFM
 
Old 04-06-2013, 01:58 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by mycuser View Post
PS at least you spared me the RTFM
But not the dreaded "please mark this thread as solved". Use the Thread Tools button located above your first post in this thread.
Tnx,
jdk
 
Old 04-06-2013, 02:44 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,500

Rep: Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431Reputation: 2431
Quote:
Originally Posted by mycuser View Post
PS at least you spared me the RTFM
No, they didn't do that, they tried to explain to read manuals and also they gave you a few, a very few examples. You will never know linux (or even bash) if you want to spare on learning
 
Old 04-06-2013, 05:39 AM   #10
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
I think the OP meant that we spare the usage of the acronym, as a joke!
 
Old 04-06-2013, 06:04 AM   #11
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by mycuser View Post
Thanks to all for speedy and to the point replies. du and df disk usage and disk free
Indeed, all the names of basic commands in Linux are mnemonic and spelling the complete name is an aid to fix them in memory. One of my favourite command names is dd that stats for Disk Destroyer. It is a very useful command but it warns the user that an inattentive usage can wipe out a disk in a bunch of milliseconds. One more reason to RTFM!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Why does this work from the bash command line and then fails in a bash script? Rupadhya Linux - Newbie 5 09-26-2012 01:05 AM
[SOLVED] How write a literal bash command in a bash file? xeon123 Linux - Newbie 6 11-29-2010 01:05 PM
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 12:21 PM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 12:10 PM
Automatically append another piped command to issued command in bash amateen Programming 1 05-07-2009 07:36 AM


All times are GMT -5. The time now is 07:57 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration