02.05.2013 Views

Basics of the MKS Toolkit - Mks.com

Basics of the MKS Toolkit - Mks.com

Basics of the MKS Toolkit - Mks.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Record-Keeping<br />

<strong>the</strong> last records in <strong>the</strong> file, giving an idea <strong>of</strong> how current <strong>the</strong> file's<br />

contents are. In a sorted <strong>com</strong>ic book list, for example, tail could<br />

show <strong>the</strong> most recent <strong>com</strong>ics that had been recorded in <strong>the</strong> file.<br />

The find <strong>com</strong>mand lists <strong>the</strong> names <strong>of</strong> all <strong>the</strong> files under a directory<br />

that have a given characteristic (or set <strong>of</strong> characteristics). The simplest<br />

version <strong>of</strong> <strong>the</strong> <strong>com</strong>mand is<br />

find dirname<br />

This just displays <strong>the</strong> names <strong>of</strong> all files under <strong>the</strong> given directory<br />

(including files in subdirectories under <strong>the</strong> directory).<br />

find dirname -name pattern<br />

displays <strong>the</strong> names <strong>of</strong> all files <strong>the</strong> names <strong>of</strong> which have a certain form.<br />

For example,<br />

find abc -name '*.lst'<br />

lists <strong>the</strong> names <strong>of</strong> all files under <strong>the</strong> directory abc which have <strong>the</strong> file<br />

extension.lst. In this way, find lets you locate files quickly, even when<br />

you have a <strong>com</strong>plicated file system structure, with many directories<br />

and subdirectories.<br />

26 <strong>MKS</strong> <strong>Toolkit</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!