Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Lab 2

No description
by

Samah Diabat

on 8 March 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Lab 2

Ubuntu Help Example Cont… Ubuntu Help man : displays the system manual
man -a utility-name ( view all man pages for a given subject)
man -k utility-name(man with –k is similar to apropos )
q : for quit. man man
man -a man
man cat
man -k cat
man 5 passwd apropos : Searching for a Keyword
Syntax: apropos utility-name
Ex: apropos sleep

whatis : similar to apropos but finds only complete word matches
Syntax: whatis utility-name
Ex: whatis sleep Cont… --help : ALSO to display information about utility
utility-name --help
Ex: cat --help Cont… To erase a character:
BACKSPACE.
DELTE.
CONTROL-H.

To Delete a word:
CONTROL-W

To Delete a line:
CONTROL-U.

To Repeat a command line:
UP ARROW. Avoid using any of the following characters in a filename, because they make the file harder to reference on the command line:

1. | * ? ' " ‘ [ ] ( ) $ < > { } # / \ ! ~
2. RETURN, SPACE, and TAB. Special Characters If you need to use a character that has
a special meaning to the shell as a regular character, you can quote it.

To quote a character, precede it with a backslash (\).


Example: you would enter
**  \*\* OR ‘**’ Quoting special characters

Linux Basic Utility…. Lists the names of files in your home directory
Syntax : ls
Ex:
ls –l: lists details of file (long listing format)
ls -1: show single entry per line
ls -a: show hidden files LS To create a file.

Type I to enter on input mode, that allow you to write what you want on the file.

Press ESC to return on a command mode
Shift+ZZ :to save the file and quit from the file editor

Syntax : vim file-name Vim editor CAT Info : complete and up-to-date information
Info →h ( display Basic Info Commands)
info utility-name
Ex: info cat

q or ctrl+c : to quit .

pinfo : similar to info but is more intuitive
Syntax: pinfo utility-name
Ex: pinfo cat Displays the contents of the text file.

Syntax :
cat file-name less / more When you want to view a file that is longer than one screen, you can use either the less utility or the more utility.

These utilities are called pagers, because they display one page at a time
Syntax :
more file-name
Less file-name Displays the name of the system you are working on
Syntax :
hostname HOSTNAME Makes a copy of a file
You can use cp to make a backup copy of a file or a copy to experiment with
Syntax :
cp source-file destination-file
cp -i source-file destination-file CP MV Changes the Name of a File
can rename a file without making a copy of it
Syntax :
mv existing-filename new-filename
mv –i existing-filename new-filename The grep utility searches through one or more files to see whether any contain a specified string of characters.
This utility does not change the file it searches but simply displays each line that contains the string.
Syntax :
grep key-word file-name
grep -w key-word file-name:
match only whole words GREP By default the head utility displays the first ten lines of a file.

To specify the number of lines displayed, include a hyphen followed by the number of lines in the head command.

Syntax :
head – num_of_lines file-name HEAD
The tail utility is similar to head but by default displays the last ten lines of a file.

Syntax :
tail – num_of_lines file-name TAIL displays the contents of a file in order by lines but does not change the original file

Syntax :
sort file-name (alphabetical)
sort –u file-name (no duplicates)
sort –n file-name (by numbers) SORT The uniq (unique) utility displays a file, skipping adjacent duplicate lines, but does
not change the original file.

If a file is sorted before it is processed by uniq, this utility ensures that no two lines in the file are the same.

Syntax :
uniq file-name UNIQ The diff (difference) utility compares two files and displays a list of the differences
between them.

It is useful when you want to compare two versions of a letter, report, or source code for a program

Syntax :
diff –u first-file second-file DIFF FILE The echo utility copies anything you put on the command line after echo to the screen.
Syntax:
echo statement
You can use echo to create a simple file by redirecting its output to a file:
Syntax:
echo 'statement' > filename ECHO The date utility displays the current date and time.

Syntax :
date DATE Any question? Identifies the Contents of a File.
(Tests the Contents of a File).
You can use the file utility to learn about the contents of any file on a Linux system
without having to open and examine the file yourself.

Syntax :
file file-name PIPE A pipe ‘|’ takes the output of one utility and sends that output as input to another utility .

Syntax :
utility-name file-name | utility-name
cat file-name | head RM The rm (remove) utility deletes a file.

Syntax :
rm file-name
rm –i file-name: to ensure that you delete the file you intend to only Lpr: Prints a File (lpr filename).
you can use lpstat –p to display
a list of available printers
You can see which jobs are in the print queue by giving an
lpstat –o command or using the lpq utility
You can use the job number with the lprm utility to remove the job from print queue and stop it from printing Lpr
Full transcript