Reputation
7,365
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 21 44
Newest
 Nice Answer
Impact
~837k people reached

Jul
10
comment Determine Location of Inode Usage
That would likely take a billion years. A quicker thing to do is to run lsof | grep DIR and look in each of those directories for lots of new files.
Jul
10
comment Determine Location of Inode Usage
The inodes could also be taken by really deep directories, which this won't find. There are a number of weird edge cases in this, but the most common situation is a directory full of files with normal names.
Jul
10
comment Determine Location of Inode Usage
@mike G: You're 100% correct about this not being the fastest way to do this sort of thing. In my mind, the correct way to optimize this is to redirect to stderr when starting and finishing the "count directory entries" part of the script. That way, when you hit a directory with a million entries it will say "processing directory spool/postfix/maildrop" and then not say instantly "finished" and boom -- look in spool/postfix/maildrop and you'll see lots of files.
Jul
10
comment Determine Location of Inode Usage
I just ran a test on a directory with a million files and ls took 22 seconds and echo * took 12 seconds. (For the record, echo * in shell won't hit the arg limit because echo in 99% of shells in active use is a built-in)
Jul
10
comment Determine Location of Inode Usage
True about the ls -- in situations like this I worry more about it being clear what I'm doing and not so much about the performance. I'm pretty sure that you can use echo $line/* | wc -w in place of ls $line | wc -l and you avoid the ls sorting issue.
Jul
10
revised Determine Location of Inode Usage
added 185 characters in body
Jul
10
answered Determine Location of Inode Usage
Jul
10
comment What is the difference between unlink and rm?
"Premature optimization is the root of all evil (or at least most of it) in programming." -- Donald Knuth en.wikiquote.org/wiki/Donald_Knuth
Jul
10
comment Skipping hardlinks when using TSM Backup
Let us know what the eventual resolution to this is -- if it is an exclude list or if there really is a magic "please don't explode" flag you can set in tsm...
Jul
9
comment Skipping hardlinks when using TSM Backup
Another document discusses the difference here publib.boulder.ibm.com/infocenter/tivihelp/v1r1/topic/…
Jul
9
revised Skipping hardlinks when using TSM Backup
added 1 characters in body; added 10 characters in body
Jul
9
revised Skipping hardlinks when using TSM Backup
deleted 283 characters in body
Jul
9
revised Skipping hardlinks when using TSM Backup
added 1136 characters in body
Jul
9
comment Skipping hardlinks when using TSM Backup
I found another doc on the same site -- and am editing my answer to reflect the other doc...
Jul
9
revised Skipping hardlinks when using TSM Backup
added 8 characters in body
Jul
9
answered Skipping hardlinks when using TSM Backup
Jul
8
comment how to export VARs from a subshell to a parent shell?
Yes -- you can do this with an alias or function (I prefer functions myself) where you have the function prod() { export VAR=snoopy ; } ; and the function dev() { export VAR=woodstock ; } ;
Jul
8
comment Routing protocols, distance vector vs link state
I can see reasons why people may want to run eigrp in a cisco only shop. I chose routing protocols based on device support and protocol behavior, not on the color of the protocol or the underlying algorithm.
Jul
8
answered FreeBSD disk partitioning for web-application server(Apache/MySQL/PHP)
Jul
8
revised how to export VARs from a subshell to a parent shell?
added 914 characters in body