Chapter 19. Miscellaneous

The miscellaneous chapter contains commands that don't really fit into the other sections of this guide.

renaming extensions

To rename all of the files in the current directory with a '.htm' extension to '.html', type:

$ chcase -x 's/htm/html/' '*.htm'

You can get a copy of the chcase perl script here.

For more complex renaming you should read Section 7.3

rel[1]

Use rel to analyze text files for relevance to a given set of keywords. It outputs the names of those files that are relevant to the given keywords, ranked in order of relevance; if a file does not meet the criteria, it is not outputted in the relevance listing.

units man page

There is a man page, part of the Linux Programmers Manual called “units”. It displays various information on the various scientific measurements (such as mega, giga et cetera). This manual page also has a short discussion about the argument over which standard should be used to measure data (ie. the kibibyte vs kilobyte).

To access this man page type:

man 7 units
fortune

fortune is a tool which will print a random, hopefully interesting quote or entertaining short piece of writing. There are options to customise which area the epigrams should come from. Just type fortune to get a random epigram from any section.

Simply type:

fortune

Notes

[1]

This information information comes from the Linux Cookbook (without editing). See [3] in the Bibliography for further information.