|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Du -sk command in SunOS 5.10
Hi, I am little confuse after using Code:
du -sk on file . I have file listing like: Code:
-rw-r--r-- 1 Xuser Ygrp 51419029531 Sep 21 07:40 catalina.out when i issue cmd : Code:
du -sk catalina.out gives output as Code:
1804511 catalina.out This means 1804511 KB. Which means 1 GB. But if i calculate using 51419029531 bytes / 1024 bytes = 50213896.0 KB 50213896.0/1024=49037 MB 49037/1024= 47 GB It shows 47 GB but du shows 1 GB. Please let me know where I am doing wrong. Thanks Krsna
Last edited by vbe; 09-21-2012 at 03:47 AM.. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
try this also... Code:
stat -c%s catalina.out ls -lh catalina.out du -h catalina.out |
| Sponsored Links | ||
|
|
#3
|
||||
|
||||
|
You will have to explain how you got your first figure... Look: Code:
slo4:/export/home/vbe $ uname -r 5.10 slo4:/export/home/vbe $ ls -l amanda-3.3.0.tar.gz -rwxr-xr-x 1 vbe sysadm 4193702 Nov 7 2011 amanda-3.3.0.tar.gz slo4:/export/home/vbe $ du -sk amanda-3.3.0.tar.gz 4100 amanda-3.3.0.tar.gz |
|
#4
|
|||
|
|||
|
Might be a "sparse file", i.e. a file with holes in it. List it with
ls -s , col 1 will show the actually used blocks on disk, as does
du , col 5 will show what the file system thinks the size is: Code:
$ ls -ls fn 8 -rw-r--r-- 1 root root 4194339 Sep 21 09:56 fn $ du -sk fn 8 fn |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| chmod command in SunOS | hikaru022002 | Solaris | 4 | 03-01-2012 05:44 AM |
| SunOS: How to exclude directory in find command? | saps19 | Shell Programming and Scripting | 3 | 03-28-2011 04:24 AM |
| Tar Command in SunOS 5.6 | mojoman | UNIX for Dummies Questions & Answers | 1 | 05-07-2010 03:55 PM |
| usleep command is not available in SunOS | pa.chidhambaram | Solaris | 5 | 06-23-2009 05:31 PM |
| Migration of binary file from Sunos 5.8 to Sunos 5.9 | Arvind Maurya | UNIX for Advanced & Expert Users | 1 | 07-12-2005 06:23 AM |
|
|