I believe I understand what the command means, but putting it in simple words is what is getting me. The command I am working on is the following:
Code:
find */public_html –type d | cut –f 1 –d/ | uniq –c | sort –g | tail -5
Now this is what I have came up with as far as what each thing means in this command:
find = Search for files that meet a desired criteria
-type d = directory
cut = Divide a file into several parts
-f =are separated by a TAB character by default.
1 = parse out column 1
-d/ = ??
uniq = Uniquify files
-c = Print the number of times each line occurred along with the line.
sort = sort text files
-g = Sort numerically, using the standard C function `strtod' to convert a prefix of each line to a double-precision floating point number. - not sure what this means though...
tail -5 = Output the last N (number) lines.
I have ran this command in linux after issuing the
command, and then issued
Code:
find */public_html –type d | cut –f 1 –d/ | uniq –c | sort –g | tail -5
to get a better understanding of it, to see what it looks like and see what it does. As far as I understand it, it lists off all users within crux and sort order, but a lot of them are Permission Denied so it doesn't exactly do the last 5 lines of a file. So I am definitely confused!!
Anyway someone could help me better understand this? I'd highly appreciate it.
-----
Also wanted to quickly add that I noticed that when I reran that command in linux that after it scans all users it has 5 lines that are completely different from the rest that it scans through that looks like the following:
628 userid
643 userid
673 userid
826 userid
1706 userid
So I'm assuming that would be the tail part of the command. Am I wrong about this or am I way off? Sheesh, I'm so confused with this command it's not even funny. lol