Re:Arch Linux to migrate to Systemd
by dredmorbius on Wednesday August 15, 2012 @02:34AM
(#4384881)
'ls -A | wc -l' will spare you having to account for the '.' and '..' lines. Omitting the '-l' (redundant for your case) also spares the "totals" line.
"Oh, and because each script runs in less than an hour, we can just say n = 1 hour, and that's a constant, so it simplifies down to instant!"
Yeah, that's not how computational complexity works.
ls -alh | wc -l returns 89. I can subtract "..", ".", and the "totals" lines, so that's 86 init scripts.
Big O for 86 scripts is 86 * n, which simplifies to "n". I'm not concerned.