Sponsored Content
Operating Systems Solaris Directory size larger than file system size? Post 302378202 by pludi on Monday 7th of December 2009 08:15:29 AM
Old 12-07-2009
Quote:
Originally Posted by sparcman
Thanks for your reply DukeNuke2. If the proc file system is dynamically generated, will it still effect the size of the / file system? My / file system now reports 100% full. Do I need to reboot in order to clear down the /proc file system?
No. If you check the output of mount, you'll see that /proc is treated as a separate mount point, and as such does not add to the usage of the root filesystem.

Also, the files in /proc only represent current processes, so the big files should vanish as soon as the associated process ends.
Quote:
Originally Posted by sparcman
Also this doesn't explain why the file system with the Oracle Temp file read 64GB and the 20GB file system reported 7GB free? Any ideas?
Could be that that was a sparse file.
Example that creates a 100M file on a 10M filesystem(uses Linux Loopback device)
Code:
# pwd
/tmp/sparse_test
# dd if=/dev/zero of=example.img bs=1024k count=10
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 0.0421919 s, 249 MB/s
# mkfs -t ext2 example.img
[...]
# mkdir example
# mount example.img example -oloop
# mount
[...]
/tmp/sparse_test/example.img on /tmp/sparse_test/example type ext2 (rw,loop=/dev/loop0)
# df -h
Filesystem            Size  Used Avail Use% Mounted on
[...]
/tmp/sparse_test/example.img
                      9.7M   92K  9.1M   1% /tmp/sparse_test/example
# cd example/
# dd if=/dev/zero of=sparse_file bs=1 count=0 seek=100M
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.7319e-05 s, 0.0 kB/s
# ll -h
total 12K
drwx------ 2 root root  12K Dec  7 14:09 lost+found
-rw-r--r-- 1 root root 100M Dec  7 14:10 sparse_file
# df -h
Filesystem            Size  Used Avail Use% Mounted on
[...]
/tmp/sparse_test/example.img
                      9.7M   92K  9.1M   1% /tmp/sparse_test/example

 

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. AIX

file system size

Dear ALL Today I faced one problem in the file system, during invoking the command #df -k , I saw /usr reached to 95% Used, could any one give advice ? thanks & regarded (7 Replies)
Discussion started by: magasem
7 Replies

3. Programming

how to get the file system size

I have the next code, and the output is incosistent, what is the problem: free blocks: 1201595 block size: 4096 total size(free blocks * block size): 626765824 1201595 * 4096 not is 626765824, what's the problem??? #include <sys/statvfs.h> #include <stdio.h> int main(){ ... (1 Reply)
Discussion started by: lucaxvu
1 Replies

4. Shell Programming and Scripting

Size of file and directory

Hello. I do have a problem. The statement sounds like this: Given a directory, find all subdirectories (regardless of depth) which contain a file that has more than a half of the size of the respective subdirectory. I've tried to solve this in many ways, but all I came up with is half... (1 Reply)
Discussion started by: WorkOfArt
1 Replies

5. 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

6. 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

7. Shell Programming and Scripting

How to delete some of the files in the directory, if the directory size limits the specified size

To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies

8. 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

9. Programming

Size of a directory or a file

Hello, Here is my code: :~$ truncate -s 16M MyTestFile.txt :~$ du -h MyTestFile.txt 4,0K MyTestFile.txt Q1: Please why du -h does not work in this case ? Q2: Other than "du -h", how can i get the size of a directory (using linux command) Thanks a lot. Best Regards. (2 Replies)
Discussion started by: chercheur111
2 Replies

10. UNIX for Beginners Questions & Answers

Help with Expect script for pulling log files size larger than 500Mb;

I am new at developing EXPECT scripts. I'm trying to create a script that will automatically connect to a several UNIX (sun solaris and HPUX) database server via FTP and pull the sizes of the listener/alert log files from specified server directory on the remote machines. 1. I want the script... (7 Replies)
Discussion started by: mikebantor
7 Replies
VNDCOMPRESS(1)						    BSD General Commands Manual 					    VNDCOMPRESS(1)

NAME
vndcompress, vnduncompress -- compress/uncompress file system images to/from cloop2 format SYNOPSIS
vndcompress [-cd] disk/fs-image compressed-image [blocksize] vnduncompress [-cd] compressed-image disk/fs-image DESCRIPTION
The vndcompress program compresses an existing file system image into a cloop2 compatible compressed file system image. An optional block- size can be given. If omitted, the default of 64kB is used. The vnduncompress command decompress a cloop2-compressed file system image back into a regular image. The file system images that can be handled are not limited to any specific file system, i.e. it is possible to handle images e.g. in ISO 9660 or UFS/FFS format. File system images in the cloop2 format are intended to be used with the vnd(4) driver in compressed mode as configured by the -z option of the vnconfig(8) program, and later mounted with the appropriate -t option to mount(8). OPTIONS
The following options are available: -c Always compress, even if the program was started as vnduncompress. -d Always uncompress (decompress), even if the program was started as vndcompress. EXIT STATUS
The vndcompress and vnduncompress utilities exit with one of the following values: 0 The operation was performed successfully. 1 An error occurred. EXAMPLES
To compress an existing CD-ROM file system image, run the following commands: # vndcompress netbsd.iso netbsd.izo Note that the resulting compressed image cannot be mounted directly via NetBSD's vnd(4) and mount_cd9660(8) commands any longer. Instead, you will have to use the -z option of vnconfig(8). The following example decompresses an existing CD-ROM file system image that was compressed in the cloop2 format into a regular file that can then be mounted: # vnconfig vnd0 KNOPPIX.iso # mount -t cd9660 -o ro /dev/vnd0d /mnt # vnduncompress /mnt/KNOPPIX/KNOPPIX /var/tmp/knoppix.iso # umount /mnt # vnconfig -u vnd0 # # vnconfig vnd1 /var/tmp/knoppix.iso # mount -t cd9660 -o ro /dev/vnd1d /mnt # ls /mnt .rr_moved cdrom floppy lib opt sbin usr bin dev home mnt proc sys var boot etc initrd none root tmp vmlinuz # umount /mnt # vnconfig -u vnd1 As an alternative, if your vnd(4) was compiled with VND_COMPRESSION, you can use vnconfig(8) to access the cloop-compressed image directly, e.g., # vnconfig vnd0 KNOPPIX.iso # mount -t cd9660 -o ro /dev/vnd0d /mnt # vnconfig -z vnd1 /mnt/KNOPPIX/KNOPPIX # mount -t cd9660 -o ro /dev/vnd1d /mnt2 # ls /mnt2 .rr_moved cdrom floppy lib opt sbin usr bin dev home mnt proc sys var boot etc initrd none root tmp vmlinuz # df /mnt /mnt2 Filesystem Size Used Avail Capacity Mounted on /dev/vnd0a 692M 692M 0B 100% /mnt /dev/vnd1a 1.9G 1.9G 0B 100% /mnt2 # umount /mnt2 # vnconfig -u vnd1 # umount /mnt # vnconfig -u vnd0 Note how the 1.9GB big filesystem on /mnt2 is mounted from the compressed file stored on the 692MB CD mounted on /mnt. To create a com- pressed file system image of an existing directory and mount it, run: # makefs -t ffs include.fs /usr/include # vndcompress include.fs include.fs.cloop2 # vnconfig -z vnd0 include.fs.cloop2 # mount -o ro /dev/vnd0a /mnt # ls /mnt To undo the steps, run: # umount /mnt # vnconfig -u vnd0 # rm /tmp/include.fs.cloop2 # rm /tmp/include.fs SEE ALSO
gzip(1), vnd(4), mount(8), mount_cd9660(8), vnconfig(8) AUTHORS
The vndcompress utility was written by Florian Stoehr <netbsd@wolfnode.de>. The vndcompress manual page was written by Florian Stoehr <netbsd@wolfnode.de> and Hubert Feyrer <hubertf@NetBSD.org>. BSD
December 12, 2005 BSD
All times are GMT -4. The time now is 07:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy