![]() head
|
![]() xmaple
|
![]() |
One of the best features of unix is the very wide variety of ways to manipulate
files (and data streams-which which will be discussed later). You have already
seen some of many kinds the commands that can be used with files: list, copy,
move, remove, view, edit and print commands. Unix, in all of its varieties,
has many more commands, and variations on them, than most users will ever want
to know about. If you ever need a command that will do something obscure,
check the manuals and the man
pages, you may find a command that
will do exactly what you want.
This section covers some of the file commands and utilities commonly (although
not as frequently as those discussed earlier) used by scientists. It will
start with the cat
and head
commands, which can both
be used to view files. Cat
can also be used to create files and
to group several files into one.
Next the functions of the special symbols <
, >
,
>>
and |
will be discussed. You have seen some of
these symbols before. Here you can learn more about what they do and how
they can be used.
Finally the file utilities, find
, grep
,
sort
and diff
will be discussed. These utilities
allow you to quickly search and compare files in ways that would be painstaking
and time consuming by hand.
head
cat
Command
<
and >
>>
|
find
egrep
sort
diff
and cmp
![]() head
|
![]() xmaple
|
![]() |