Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many inodes? 1

Status
Not open for further replies.

SamBones

Programmer
Aug 8, 2002
3,186
US
Is there a command that shows how many inodes on a file system are available and in use? The command "apropos" doesn't seem to shed any light...

Code:
$ apropos inode
clri            clri (1m)       - clear inode
dcopy           clri (1m)       - clear inode
fsirand         fsirand (1m)    - install random inode generation numbers

BTW, this is for Solaris, but also looking for a generic *NIX solution.


 
I can only speak for the systems I have worked with.

see the 'df' command. df -i should report both used and free inodes.

Hope this helps

piperent
 
Awesome, thanks piperent. The Solaris "[tt]df[/tt]" doesn't have the "[tt]-i[/tt]" switch, but it does have a couple others that seem to give me what I'm looking for.

Code:
$ [b]df -F ufs -o i[/b]
Filesystem             iused   ifree  %iused  Mounted on
/dev/dsk/c0t0d0s1     168563 1077773    14%   /
/dev/dsk/c0t0d0s3      20070  480794     4%   /var
/dev/dsk/c0t1d0s0        212 17084716     0%   /backup
/dev/dsk/c0t0d0s5       4153 2482695     0%   /app
/dev/dsk/c0t0d0s6         12 1246324     0%   /log
/dev/dsk/c0t0d0s4      19354  481510     4%   /opt
/dev/dsk/c0t0d0s7       7798 2531466     0%   /export/home

$ [b]df -F ufs -e[/b]
Filesystem              ifree
/dev/dsk/c0t0d0s1     1077773
/dev/dsk/c0t0d0s3      480794
/dev/dsk/c0t1d0s0    17084716
/dev/dsk/c0t0d0s5     2482695
/dev/dsk/c0t0d0s6     1246324
/dev/dsk/c0t0d0s4      481510
/dev/dsk/c0t0d0s7     2531466

$ [b]df -g .[/b]
/export/home       (/dev/dsk/c0t0d0s7 ):         8192 block size          1024 frag size  
42207296 total blocks   21770494 free blocks 21348422 available        2539264 total files
 [b]2531466 free files[/b]      8388623 filesys id  
     ufs fstype       0x00000004 flag             255 filename length


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top