The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to make a line BLINKING in output and also how to increase font size in output mail2sant Shell Programming and Scripting 3 04-14-2008 07:30 AM
compare file size from a output file from a script moustik Shell Programming and Scripting 7 11-07-2007 10:17 AM
command to find out total size of a specific file size (spread over the server) abhinov SUN Solaris 3 08-08-2007 06:48 AM
Printing to a Savin - Size of output wrong h1timmboy AIX 2 02-28-2006 09:19 AM
block size and du output moxxx68 Shell Programming and Scripting 2 01-11-2005 09:00 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-02-2008
Stin Stin is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 28
ls -l output file size

Hi Guys,

I'm working on various platforms:

Solaris 8
HP Tru64
RH Linux

I'm on the HP Tru64 system and I've got to audit a particular directory for large files that are no longer being used.

If I do an ls -l I get to see the file size. I'd just like to be clear on what that file size is measured in. Is it bytes, kilobytes, or cabages?

Will it be the same for the Sol8 and Linux OSes too?

Also if someone has some tips that might make my time more efficient, I'd greatly appreciate it.

Many thanks in anticipation.

Stin
  #2 (permalink)  
Old 04-02-2008
Stin Stin is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 28
Sorry for x2 post. wouldnt let me edit.

I think its in bytes, if so, would this be correct?

973 - would be 973 bytes
1,567 - 1.567 kilobytes
326,987,658 - 326.987658 megabytes
4,123,512,002 - 4.123512002 gigabytes
  #3 (permalink)  
Old 04-02-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Wink Take a look at the man pages for ls

"size in bytes"

Code:
    -l           Lists in long format, giving mode, ACL  indica-
                  tion,  number  of  links, owner, group, size in
                  bytes, and time of last modification  for  each
                  file  (see  above).  If  the  file is a special
                  file, the size field instead contains the major
                  and  minor  device numbers. If the time of last
                  modification is greater than six months ago, it
                  is  shown  in  the format `month date year' for
                  the  POSIX  locale.  When  the  LC_TIME  locale
                  category is not set to the POSIX locale, a dif-
                  ferent format of the time field  can  be  used.
                  Files  modified  within  six months show `month
                  date time'. If the file is a symbolic link, the
                  filename  is  printed  followed by "->" and the
                  path name of the referenced file.
  #4 (permalink)  
Old 04-02-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,568
Why dont you use du -sk <filename> or * ?
then you know that on all platform you are seing size in KB...
  #5 (permalink)  
Old 04-08-2008
Stin Stin is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 28
Thanks guys.

And du -sk * is ideal for what I need.

Thanks gain for all replies.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:40 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0