Reputation
4,414
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 11 30
Newest
 Explainer
Impact
~556k people reached

21h
revised Get recursive file count (like `du`, but number of files instead of size)
added 287 characters in body
21h
answered Get recursive file count (like `du`, but number of files instead of size)
21h
comment Get recursive file count (like `du`, but number of files instead of size)
I was just about to comment on file names with newlines... find has a printf option, IIRC, so you can output a simple '.' per match. (Still doesn't directly do what the OP wants, though.) I guess you could find for all directories first, and then -exec a second findto count files in that dir, but that seems wasteful as it touches the subdirs multiple times.
2d
comment Get Name of Computer Cross-platform?
Your behaviour of hostname sounds more like hostname -i to me. For completeness' sake, can you try hostname -a (show alias name) and hostname -s (show short host name)?
Jul
26
comment Python 2.7.10 on centos 6.6 but no IDLE
We'll likely need to know how you installed your custom python -- did you get packages from someplace, or did you compile from source?
Jul
25
comment Why create /home and mount to / partition?
@kAldown: you could find the right partition and have old-style /dev/sda1 etc. there, but why? The uuid will remain the same if you plug the drive into a different SATA port, sdX might not.
Jul
24
reviewed Reject Log when program is run
Jul
24
comment date/time setting does not work after unplugging power adapter or sudden power cut
Trying hwclock --systohc is unlikely to make the problem worse. (You may run into things like your time zone offset being added to the system time on each boot if you set local time and thesystem expects UTC and things like that, but you can see if the year, month, day and minute persist over a reboot now and fix the other stuff later.)
Jul
24
comment date/time setting does not work after unplugging power adapter or sudden power cut
Are you just using date or are you already persisting it to the BIOS with hwclock --systohc?
Jul
22
comment nc command can't lookup DNS name
What does stat /etc/hosts say? The "no such file..." leads me to believe your local name resolution may have trouble.
Jul
22
reviewed Approve Pointing 2 different paths to the same Apache domain name
Jul
21
comment Find MAPISend syntax and Replace with BLAT syntax
Wouldn't it be easier to put a "fake" program called mapisend that internally calls blat, instead of changing all your scripts?
Jul
20
reviewed Approve How to create Swap from already created mount points
Jul
15
comment ubuntu document reader for acrobat pdf forms
Is it filling out for purposes of printing out, for saving and passing on, or for online submission to a server? (In order of increasing difficulty.)
Jul
14
comment Where are my inodes going?
@lcd047: for the record: --inodes is not yet present in GNU coreutils 8.4 (for example, RH/CentOS/SL 6.6).
Jul
10
comment Make a Scheduled job for Renaming the files in a folder and send an updated alert email
Be careful, there's two incompatible tools by the name of rename. (Also, I don't think a and b will contain what you think, you need $(cat ...) I think?
Jul
9
comment lsof vs cat/proc/…/maps
lsof shows FD: DEL, which man lsof says is "for a Linux map file that has been deleted;"
Jul
8
reviewed Approve I can launch an app as 'myuser', and as 'root', but not using 'kdesu'. How do I launch wth 'kdesu'?
Jul
8
comment list all files with extension .log except one
Well, the point where things get ugly is when you have spaces or newlines in file names, which throws off wc -l.
Jul
7
comment list all files with extension .log except one
@JavierCintrón: yes, but once you want to do anything with the files, it's easier to find -exec than to worry about parsing the output of ls, which you cannot usually do in a safe manner.