LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-09-2003, 03:11 PM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
size of my home direcory


Hi i want to see from tehe console the size of my home directory.
I use this command on the shell
ls -shd /home/alaios
and the result is
4.0K /home/alaios

4k???My home directory is bigger than 350 mb!!1
 
Old 06-09-2003, 03:12 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes 4kb is the size of the directory inode. not the contents. you want "du" for that.
 
Old 06-09-2003, 03:36 PM   #3
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
xm?

You mean the du command?
Is there a parameter in the ls command for this job?
 
Old 06-09-2003, 03:39 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
that's not what ls is for... use the right tool for the job.
 
Old 06-09-2003, 03:55 PM   #5
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Never use a screwdriver for a hammer.

# How is the hard drive partitioned
fdisk /dev/hd<X> -l

# How much free drive space
df -h

# Show disk usage by current directory and all subdirectories
du | less

# What takes up so much space on your box
# Run from the directory in question and the largest chunk shows up last
find $1 -type d | xargs du -sm | sort -g

Look at man <command> or info <command> for the flags I used and for other options you can use for bash commands.

Last edited by fancypiper; 06-09-2003 at 03:56 PM.
 
Old 06-09-2003, 03:58 PM   #6
jchristman
Member
 
Registered: Mar 2003
Distribution: Fedora Core 3
Posts: 125

Rep: Reputation: 15
use the following for the whole directory size

du -sh /home/alaios

and use this format for individual file and directory sizes

du -sh /home/alaios/*
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/home/directory size limit Smokey Slackware 2 11-04-2004 03:11 PM
How to LIMIT my HOME DIRECTORY SIZE??? juliann Linux - Networking 2 07-21-2004 09:08 AM
File/Direcory Names with Spaces ar1 Linux - General 3 01-15-2004 10:41 AM
Reasonable size for a /home partition? eurleif Linux - General 9 12-26-2003 03:44 PM
Change the size of /home? srichter Linux - Software 5 05-30-2003 12:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:28 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