Novell LINUX ENTERPRISE DESKTOP 10 SP2 - DEPLOYMENT GUIDE 08-05-2008 Deployment Manual page 376

Table of Contents

Advertisement

Assuming that your test directory contains the files Testfile, Testfile1,
Testfile2, and datafile.
• The command ls Testfile? lists the files Testfile1 and Testfile2.
• The command ls Testfile? lists the files Testfile1 and Testfile2.
• With ls Test*, the list also includes Testfile.
• The command ls *fil* shows all the sample files.
• Use the set wild card to address all sample files whose last character is a number:
ls Testfile[1-9] or, using classes, ls Testfile[[:digit:]].
Of the four types of wild cards, the most inclusive one is the asterisk. It could be used
to copy all files contained in one directory to another one or to delete all files with one
command. The command rm *fil*, for instance, would delete all files in the current
directory whose name includes the string fil.
Viewing Files with Less and More
Linux includes two small programs for viewing text files directly in the shell: less
and more. Rather than starting an editor to read a file like Readme.txt, simply enter
less Readme.txt to display the text in the console window. Use Space to scroll
down one page. Use Page Up and Page Down to move forward or backward in the text.
To exit less, press Q .
Instead of less, you can also use the older program more. However, it is less convenient
because it does not allow you to scroll backwards.
The program less got its name from the the precept that less is more and can also be
used to view the output of commands in a convenient way. To see how this works, read
Section "Redirection and Pipes"
Redirection and Pipes
Normally, the standard output in the shell is your screen or the console window and
the standard input is the keyboard. However, the shell provides functions by which you
can redirect the input or the output to another object, such as a file or another command.
With the help of the symbols > and <, for example, you can forward the output of a
360
Deployment Guide
(page 360).

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux enterprise desktop 10 sp2

Table of Contents