"The most interesting part for me was figuring out how
to decipher the "file mode" information. If you check your system's
"stat" manpage, you'll see that there are actually a good deal of
macros already written-in that make printing out plain English file
types and modes much simpler, but I decided to keep it cryptic. I
take my modes like I take my permissions; in octal ;)
"Here's a sample run of the program - just using one file to
make it simple (it should be noted, also, that you can only run
this command against file types that you have permission to read.
If you run this as your regular user on a file owned by root with
700 permissions, you'll get the "File or Directory Not Found!"
error, which is, technically, incorrect. My God, am I a lazy C
programmer. No wonder I get beat up so bad every time I goof around
with it on here ;)"
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.