Counting Files or Directories
It's often useful to know the actual number of files or subdirectories in current directory, and I use it so often that I even made an aliases to the commands: ls -la |grep "^-" |awk 'END {print "Number of files: " NR}' and ls -la |grep "^d" |awk 'END {print "Number of directories: " NR}'
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|