i wrote this code to figure if two identical directories on different devices one on a partition and one on a loop had the same total size for -size +0 file only in recrusive tree form.:
awk '$1 ~ /^-/{total=i;i<=NR;i+=$5;print $0}END{print total}'
file1.... .
the output of du -hb was slightly different, but the total of files was the same.. so I tried to figure out the total of the bytes in blocks (?).. (correct me if I am wrong!).
i used bc and took the size of the number of blocks the file added up to which was 21 and multiplied it by (512*512) and devided by 2 what is this output? it looks similiar to the number I got through du but with a couple of digits on the end! is this the size in byts? two byt words? or am i supposed to devide by 8..
{quite confused) moxxx68...
Hmm... this confusion is contagious - i'm not too sure I follow you at all!
I assume from your previous posts you're still using Linux (and therefore GNU ls). I also will assume that you're trying to display file sizes in 512 byte blocks? If so, you don't need to do any calculation - if you run
ls -Rls --block-size=512
you'll get a total block count at the top of each directories' listing - with each files size in 512-byte blocks in the first column of output, e.g.
So, armed with this, it's fairly easy to grep out the "total"s, and if desired, gain a total block count for the entire tree....
Accordingly a lot of manuals - if you have block size 8KB and trying to write a 1KB file to the block, as result you waste 7KB of the block space. But recently I noticed about Fragments of File Block. In same case if you have File Block 8KB and Fragment size 1KB - you can save your block space,... (6 Replies)
Hello,
in one default UFS filesystem we have 8K block size (bsize) and 1K fragmentsize (fsize). At this scenary I thought all "FileSytem IO" will be 8K (or greater) but never smaller than the fragment size (1K). If a UFS fragment/blocksize is allwasy several ADJACENTS sectors on disk (in a ... (4 Replies)
how to make a line BLINKING in output and also how to increase font size in output
suppose in run a.sh script
inside echo "hello world "
i want that this should blink in the output and also
the font size of hello world should be big ..
could you please help me out in this (3 Replies)
Hello Unix guru's
I want to check my OS Block size for the Solaris 8
Following is one of the line from df -g command.
Can anybody help to interpret the same.
/u03 (/dev/vx/dsk/oradg/vol03): 8192 block size 8192 frag size
205463552 total blocks 50433792... (1 Reply)
AIX 4.3.3
How can I find the os block size?
How can I change the OS Block Size?
When and where does the os block size get set?
I am running oracle 8.1.7 and am under the impression I need to set my os block size = oracle block size which is 8k.
Any insight on this would be... (1 Reply)
Hi,
Somehow i have forgotten a comand that displays me the block size of the unix filesystem. Can someone letme know this command
regards
penguin (5 Replies)