Sponsored Content
Operating Systems Solaris Inaccurate file size report with du? Post 302808459 by JT-KGY on Thursday 16th of May 2013 08:29:55 PM
Old 05-16-2013
Inaccurate file size report with du?

This is really strange... my system's du is reporting file size smaller than it really is... and it is only happening on one of Solaris 10 I have...

Code:
#ls -lrt tracks.txt
-rw-r--r--   1 oracle   oinstall 2166525362 May 16 03:32 tracks.txt

# du -k tracks.txt
953805  tracks.txt

# du -h tracks.txt
 931M   tracks.txt

Reports the same from global to non-global zones of this box

Code:
#ls -lrt tracks.txt
-rw-r--r--   1 user      user      2166525362 May 16 16:34 tracks.txt

#du -k tracks.txt
2126577 tracks.txt

#du -h tracks.txt
 2.0G   tracks.txt

Reports correct on a different box running same version of Solaris and from what I can tell.. same "du" binary


Code:
#ls -lrt tracks.txt
-rw-r--r-- 1 backup backup 2166525362 May 16 16:16 tracks.txt

#du -k tracks.txt
2115752 tracks.txt

#du -h tracks.txt
2.1G    tracks.txt

Copied it to a ubuntu 12.04.. reports correctly at about 2.0G


Any insight?? Thanks!!!!

---------- Post updated at 07:29 PM ---------- Previous update was at 06:51 PM ----------

It's the zfs.... not sure why it is reporting inaccurate file size though....

On the problematic box... global zone:
Code:
# ls -lrt tracks.txt
-rw-r--r--   1 105      101      2166525362 May 16 03:32 tracks.txt

# ls -lrt /export/home/tracks.txt
-rw-r--r--   1 root     root     2166525362 May 16 17:24 /export/home/tracks.txt

# du -h tracks.txt
 931M   tracks.txt

# du -h /export/home/tracks.txt
 2.0G   /export/home/tracks.txt

file in the local directory and file in "/export/home" is the same size..
but du reports different sizes...
local directory is a ZFS mount

 

10 More Discussions You Might Find Interesting

1. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

2. Solaris

Directory size larger than file system size?

Hi, We currently have an Oracle database running and it is creating lots of processes in the /proc directory that are 1000M in size. The size of the /proc directory is now reading 26T. How can this be if the root file system is only 13GB? I have seen this before we an Oracle temp file... (6 Replies)
Discussion started by: sparcman
6 Replies

3. Shell Programming and Scripting

The scripts not able to make the file to size 0, every times it go back to its original size

#!/bin/sh ########################################################################################################## #This script is being used for AOK application for cleaning up the .out files and zip it under logs directory. # IBM # Created #For pdocap201/pdoca202 .out files for AOK #1.... (0 Replies)
Discussion started by: mridul10_crj
0 Replies

4. Infrastructure Monitoring

SNMP disk space - inaccurate numbers

on the remote server that im running the snmp command against, below is the information about the specific directory i'm concerned about: SIZE USED AVAIL 673G 483G 157G can someone explain to me why snmp is telling me the size of this filesystem is 176399584? ... (5 Replies)
Discussion started by: SkySmart
5 Replies

5. Shell Programming and Scripting

Script to read file size and send email only if size > 0.

Hi Experts, I have a script like $ORACLE_HOME/bin/sqlplus username/password # << ENDSQL set pagesize 0 trim on feedback off verify off echo off newp none timing off set serveroutput on set heading off spool Schemaerrtmp.txt select ' TIMESTAMP COMPUTER NAME ... (5 Replies)
Discussion started by: welldone
5 Replies

6. Shell Programming and Scripting

Help in Shell script to report size of files=0

Hello, I am trying to write a shell script in unix which looks for the last two files in a folder, checks their size and reports(via mail) if either of their file size is =0. cd /tmp list last two files: ls -ltr | tail -2 check if size of any of these two files is 0 if true, then send a... (8 Replies)
Discussion started by: kiran1112
8 Replies

7. UNIX for Dummies Questions & Answers

Ls directory size reporting byte size instead of file count

I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms. Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies

8. Shell Programming and Scripting

Inaccurate awk response

can someone help me figure out what's wrong with this awk code? awk '/CRON/ && /./ {i++;} { if((i>=4) && (i<8)) {print | "TIMO=$(date +%s) ; TIMO2=$(uname;who) ; echo $TIMO ---- 1 ---- Yes_Recoded,$TIMO2 ---- i >> /tmp/gona.txt" } else if (i>=8) {print | "TIMO=$(date +%s) ;... (2 Replies)
Discussion started by: SkySmart
2 Replies

9. UNIX for Beginners Questions & Answers

Inaccurate scanning of Bash array elements

username=cogiz #!/bin/bash shuffle() #@ USAGE: shuffle { #@ TODO: add options for multiple or partial decks Deck=$( printf "%s\n" {2,3,4,5,6,7,8,9,T,J,Q,K,A}{H,S,D,C} | awk '## Seed the random number generator BEGIN { srand() } ## Put a random number in front... (4 Replies)
Discussion started by: cogiz
4 Replies

10. Shell Programming and Scripting

Shell script to report file size, pid and also kill the process

Hi All, Looking for a quick LINUX shell script which can continuously monitors the flle size, report the process which is creating a file greater than certain limit and also kill that process. Can someone please help me on this? (4 Replies)
Discussion started by: vasavimacherla
4 Replies
Terrain generator for tracks(6) 				       Games					   Terrain generator for tracks(6)

NAME
trackgen - Terrain generator for tracks SYNTAX
trackgen -c category -n name [-a] [-m] [-s] [-S] [-E <n> [-H <nb>]] DESCRIPTION
This manual describes the Ac3d compiler application that is shipped with the game TORCS. OPTIONS
-c category track category (road, oval, dirt...) -n name track name -b draw bump track -B Don't use terrain border (relief supplied int clockwise, ext CC) -a draw all (default is track only) -s split the track and the terrain -S split all -E <n> save elevation file n 0: all elevatation files 1: elevation file of terrain + track 2: elevation file of terrain with track white 3: track only 4: track elevations with height steps -H <nb> nb of height steps for 4th elevation file [30] SEE ALSO
torcs(6) AUTHOR
This manual page was writen by Rudy Godoy <rudy@kernel-panik.org>, for the Debian GNU/Linux system (but may be used by others). Rudy Godoy 1.2 Terrain generator for tracks(6)
All times are GMT -4. The time now is 09:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy