LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 06-22-2007, 08:55 AM   #1
tostay2003
Member
 
Registered: Jun 2006
Posts: 126

Rep: Reputation: 15
disk space in MegaBytes


Strangely I see two values, with two different ways,

lets say I have PATH_A

with Directory_A
& Directory _B

I want to know the size of Directory_A
First Way
When I say

ls -l PATH_A

it gives size of 335872 for Directory_A ( converting to MB i.e dividing by 1024 twice = approx 0.32MB)

Second Way
when I say

du -k -s PATH_A/Directory_A

I get

113127 [converting to MB i.e. divinding by 1024 once = approx 110MB ]
 
Old 06-22-2007, 09:23 AM   #2
mhm
Member
 
Registered: Oct 2006
Distribution: RHEL, FC
Posts: 58

Rep: Reputation: 15
Hi,
try du -Sh -> h option is for human readable

or

ls -ltrh, I think it will give u the size

Regards
Mhm
 
Old 06-22-2007, 09:30 AM   #3
tostay2003
Member
 
Registered: Jun 2006
Posts: 126

Original Poster
Rep: Reputation: 15
Actually I am using trying on HP-Unix, these commands aren't working
 
Old 06-22-2007, 09:32 AM   #4
mhm
Member
 
Registered: Oct 2006
Distribution: RHEL, FC
Posts: 58

Rep: Reputation: 15
Noway man
r u sure?
du -h, I use them on HP-UX too
 
Old 06-22-2007, 09:37 AM   #5
tostay2003
Member
 
Registered: Jun 2006
Posts: 126

Original Poster
Rep: Reputation: 15
yes they ain't working
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 06:19 PM
Out Of Disk Space carlosinfl Linux - General 4 05-23-2007 01:32 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 03:58 PM
Megabytes - a story of loss and gain codeviking Linux - General 2 08-05-2003 07:21 AM
Disk space wastage 73 GB Hard disk rajgopalhg Linux - Hardware 2 10-18-2002 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:02 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
Open Source Consulting | Domain Registration