linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:39:59 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info
Utilities


cat - list file content on screen

Format
cat [options] [file-list]

Summary
cat lists all the files specified by file-list to your screen end to end.

Options
-n number, causes cat to display line numbers at the beginning of each line.


echo - just that... an echo :)

Format
echo [option] message

Summary
Very useful in scripting, lets you write messages to the terminal and can be used to display shell variables

Options
-n newline, prevents echo from displaying the newline at the end of the message

Example
#echo 'Hi!'
Hi!
#echo -n 'Hi!'
Hi!#
#echo $TERM <-- this is a shell variable
vt100
#

grep - search for pattern in file

Format
grep [options] pattern [file-list]

Summary
This utility searches one or more files for a pattern. The grep utility performs actions, specified by options every time
it finds a line that contains a match for the pattern.
If you use tabs or spaces in the pattern you must quote it.

Options
if you don't specify any options grep displays the line that contained a match for pattern.
-c    count, causes grep to display the number of times it found a match for pattern
-i     ignore case, ignores case when finding a match for pattern
-l     file list, causes grep to display only the filename in which it found a match for pattern
-v    reverse test, causes lines not containing a match to satisfy the search

head - display the beginning (head) of a file

Format
head [-number] [file-list]

Summary
The head utility displays ,without arguments, the ten first lines of the files given by file-list. If you want to display more or less than 10 lines specify this with the -number option.
If you don't specify any file-list head will read from it's standard input. This means that you can pipe to it.

less - less is more, more is less

Summary
Similar to more but you can scroll backwards in the document too!


man - display the manual

Format
man [options] page

Summary
Man is the built in manual pager in Linux. It offers allot of flexibility, and I must admit that I don't know the man utillity as good as I should. The parameter page tells man what you want help for. Normally it is a command but you can also specify a utility, function or some config file you need help with. Use the interactive commands to navigate inside the document.

Options
There are ALLOT... use "man man" to find the apropriate one..

Interactive commands
/"argument"    Higlights all words that contain "argument".
q    quit, quits man.


more - list file on screen

Format
more [options] [file-list]

Summary
Allows you to view a text file at the terminal. Almost the same as cat, but it pauses each time it fills the screen. On pause, you can press ENTER to make more display one more line. If you press space more fills another screen. More will display all the files given in the file-list argument. If you don't give it the file-list argument, more will read from it's standard input.

Options
-n     number of lines, specifies the number of lines in a screenfull.
-d    display, makes more display a explanatory message after each screenful
+n    line number, makes more start at line number n.

Interactive commands
More has a lot of interesting commands that can be used whenever more pauses here is a list of the most commonly used
d shows half a screenful
q exits from more
v starts up the vi editor with the current document at the current line (very useful)

tail - display the last part (tail) of a file

Format
tail [options] [file]

Summary
This utility displays the last part of the file specified by file. If you don't specify a file it read's from it's standard input, this means that you can pipe to it.

Options
-n    lines, the number of lines from the en of the file you want tail to display.

tar - unpacks/packs files from/to file

Format
tar key[options] [file-list]

Summary
The tar utlility can extract, add to, list, and create tar volumes. It can also extract tar.gz/tgz archives.You can only have one key mode, but you can have multiple options. The tar utility has tons of options check them out in the manual (man tar)

Key
t    table of contents, displays all the files in the archive.
A    append, adds the files specified by file-list the archive.
c    create, creates a new archive
x    extract, extracts files from the archives given by file-list

Options
v    verbose, causes tar to display each line as it reads/writes them.
-V name    Create a volume with volumename NAME. Use this together with the key A
z    filter the archive through gzip. Use this when you have a tgz/tar.gz file.
-f file   input file, Unpack from archive "file" instead of the standard input which is /dev/rtm0 (tape streamer)


Table of contents

[-NHF Control Panel-]
The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
Copyright © 1999 All Rights Reserved
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif