Hi.
I see that there are similar recent questions posted in
wait and continue if directory stays same size
and in
wait and continue if directory stays same size
My take is that directory space is allocated not just one entry at a time, but by blocks. So that there may be no noticeable change when objects are added to a directory.
Similarly, on some systems (perhaps older), directory space was not reduced when object are deleted.
A search provides these links, describing such properties as directory size:
linux - Shrink/reset directory size? - Server Fault
inode - Monotonic growth of Linux directory size/block count - Server Fault
https://bbs.archlinux.org/viewtopic.php?id=135252
So trying to detect a change in directory content by monitoring the size seems to be fruitless.
However, there are, as can be seen from the responses at LQ, that there may be ways to monitor events within a directory. (I thought I had posted a demonstration of that, but I cannot find it just now.)
Best wishes ... cheers, drl
---------- Post updated at 06:17 ---------- Previous update was at 06:08 ----------
Hi.
Exactly.
In my situation, I almost never format/indent manually because I'm too fallible and there are tools to do this. I apply these continually while I am developing. Here are some:
Tidy, format, indent, beautify, pretty-print source code text files
0) pretty-printing on postscript printer
trueprint
a2ps
1) perltidy
2) awk-pretty
ftp://ftp.armory.com/pub/scripts/fmtawksh (verified 2016.04.25)
http://www.armory.com/~ftp/
3) f90tidy
http://www.ifremer.fr/ditigo/molagnon/fortran90/ (verified 2016.04.25)
4) f77tidy
http://www.pdas.com/tidy.html (verified 2016.04.25)
5) bash, shell
http://arachnoid.com/python/beautify_bash_program.html
(verified 2016.04.25)
6) tclfrink
http://wiki.tcl.tk/2611 (verified 2016.04.25)
tcltidy
http://wiki.tcl.tk/15731 (verified 2016.04.25)
7) ruby
http://arachnoid.com/ruby/rbeautify.rb.txt (verified 2016.04.25)
ruby-beautify
8) C, C++, Objective-C, C#, and Java
astyle
C
indent
Best wishes ... cheers, drl