x
Loading
 Loading
Hello, Guest | Login | Register

What’s GNU in Old Utilities, Part One

Utility programs like ls have new features that you may not have seen. This is the first in a series about some of the handiest enhancements.

Old-timers (such as some Linux Magazine columnists) have been using Unix and Linux since the days of… well, it’s been a while. If you’re a long-time user too, you may think you know all of the command-line options and features of common utilities like ls. However, a quick glance through the ls man or info pages, though, shows that hackers have been busy adding capabilities to ls and many other longstanding utilities.
Even if you aren’t old as the hills (and you’ve never heard of the FORTRAN carriage-control utility asa), you may still be surprised at some of the things common utilities can do. That’s especially true if you’ve just come to Linux from another system that doesn’t have GNU versions of standard Unix utilities.
This month, let’s take a tour of new features of ls that could have you brushing the cobwebs off of your documentation. Along the way, we’ll also see how “block size” is calculated in GNU utilities. Let’s dig in.

Time Styles

Long-time shell programmers have had to hack around the changing date outputs of ls –l. For example, to get and parse a file’s last-modification date, code must handle files modified less than six months ago (where ls outputs the month, date, and clock time) and files modified more than six months ago (where you’d get the month, date and year).
But in GNU ls, the default time…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. KDE 4.4: Does It Work Yet?
  2. Writing Custom Nagios Plugins with Python
  3. Power Up Linux GUI Apps
  4. Tweeting from the Command Line with Twyt
  5. When Memory Serves You: Using ramfs and tmpfs
Follow Linux Magazine
Rackspace