Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'more/less doesn't uncompress first' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
more/less doesn't uncompress first
Authored by: scooby509 on Sep 17, '09 08:52:32PM
Less certainly works differently than cat, but Apple would have to specifically modify it to not use standard POSIX calls. Here's the source to cat; search for 'fdopen' to see where it's opening its input file.

Less is a surprisingly complex utility but it still uses a standard POSIX function to open a regular file in this source file, search for open(qopen_filename, OPEN_READ) within the file to find it.

man 3 fdopen 2 open will confirm that both of these system calls are standard POSIX calls, so they don't really know anything about HFS vs. any other file system.

(Also, 'more' is simply the compatibility mode of 'less.' They're the same file, hard linked.)

[ Reply to This | # ]