LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-23-2005, 10:26 PM   #1
psychobuffalo
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian Etch
Posts: 12

Rep: Reputation: 0
command: file size?


What is the command to see the sizes of files?
 
Old 08-23-2005, 10:59 PM   #2
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
du

I usually do "du -sh" to show just what files/directories you want and give you "human-readable" output instead of size in bytes.
 
Old 08-23-2005, 11:02 PM   #3
DMRansom
Member
 
Registered: Jun 2003
Distribution: slackware, fedora core4
Posts: 39

Rep: Reputation: 15
ls -sh
will give you file size in human readable format
you can get more options with
man ls

ls --help
 
Old 08-23-2005, 11:06 PM   #4
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Well that's handy. I knew "ls -lh" would do it but never saw "-s". Thanks
 
Old 08-24-2005, 06:19 AM   #5
delackoo
LQ Newbie
 
Registered: Aug 2005
Location: East Asia
Distribution: Slackware10.1/ubuntu5.04
Posts: 1

Rep: Reputation: 0
Re: command: file size?

Quote:
Originally posted by psychobuffalo
What is the command to see the sizes of files?
du -ah/-ch/-lh/-sh filename
ls -lh/-sh filename
...

You can find more option in man
 
Old 08-24-2005, 10:30 AM   #6
psychobuffalo
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian Etch
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for your responses - I couldn't remember the du command. I had actually looked at the ls man, but I'm too much of a n00b to figure out the "-sh" argument.<g>
 
  


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
Command folder size Ataraxos Linux - Newbie 8 04-03-2005 12:09 PM
when creating a *.iso file, how to make the file size smaller? minm Linux - Newbie 8 12-26-2004 09:58 PM
command line font size poiuytrewq Linux - Newbie 8 09-21-2004 02:57 AM
file system size larger than fysical size:superblock or partition table corrupt klizon Linux - General 0 06-18-2004 04:18 PM
Command to find total file size satimis Linux - Newbie 1 01-22-2004 11:19 AM

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

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