Upload
orsen
View
48
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Basic UNIX Commands. Commonly used Unix commands. Read a Text File. Head Tail More. Starting and Ending. login : `Logging in' telnet : Connect to another machine logout : `Logging out'. File Management. - PowerPoint PPT Presentation
Citation preview
Basic UNIX Commands
Commonly used Unix commands
Read a Text File
• Head
• Tail
• More
Starting and Ending
login: `Logging in'
telnet: Connect to another machine
logout: `Logging out'
File Management • emacs: `Using the emacs text editor'
mkdir: `Creating a directory'cd: `Changing your current working directory'ls: `Finding out what files you have'cp: `Making a copy of a file'mv: `Changing the name of a file'rm: `Getting rid of unwanted files'chmod: `Controlling access to your files'cmp: Comparing two fileswc: Word, line, and character countcompress: Compress a file
Communication
• e-mail: `Sending and receiving electronic mail'
• talk: Talk to another user• write: Write messages to another user• ftp: `Transferring files with ftp'
Information
• man: Manual pages
• quota -v: Finding out your available disk space quota
• ical: `Using the Ical personal organizer'
• finger: Getting information about a user
• passwd: Changing your password
• who: Finding out who's logged on
Printing
• lpr: `Printing'
• lprm: Removing a print job
• lpq: Checking the print queues
Job control• ps: `Finding your processes'
• kill: `Killing a process'
• nohup: Continuing a job after logout
• nice: Changing the priority of a job
• &: `What is a background process?'
• Cntrl-z: Suspending a process
• fg: `Resuming a suspended process'
Selecting a Unix shell
• sh – The first shell, historically, was sh, also known
as the Bourne shell. It is good for writing shell scripts, but not so popular for interactive use.
• csh – Also known as C-Shell, csh features a syntax
somewhat like the C language. It allows (among other things) adding your own commands (aliasing), history substitution (re-execution of previously typed commands), and filename completion.
• tcsh – This shell allows you to edit your command
line while you're typing it, using emacs-like commands. It has a number of other nifty features, but is otherwise compatible with csh.
• bash – Compatible with sh for programming
purposes, it has many of the good features of csh and tcsh: file name completion, job control, history substitution, emacs command-line editing, and many more.