Sie sind auf Seite 1von 7

UNIX - USEFUL COMMANDS

http://www.tutorialspoint.com/unix/unix-useful-commands.htm
Copyright tutorialspoint.com

This quick guide lists commands, including a syntax and brief description. For more detail, use:
$man command

Files and Directories:


These commands allow you to create directories and handle files.

Command cat cd chgrp chmod cp file find grep head ln ls mkdir more mv pwd rm rmdir tail touch

Description Display File Contents Changes Directory to dirname change file group Changing Permissions Copy source file into destination Determine file type Find files Search files for regular expressions. Display first few lines of a file Create softlink on oldname Display information about file type. Create a new directory dirname Display data in paginated form. Move (Rename) a oldname to newname. Print current working directory. Remove (Delete) filename Delete an existing directory provided it is empty. Prints last few lines in a file. Update access and modification time of a file.

Manipulating data:

The contents of files can be compared and altered with the following commands.

Command awk cmp comm cut diff expand join perl sed sort split tr uniq wc vi vim fmt spell ispell ispell emacs ex, edit emacs emacs

Description Pattern scanning and processing language Compare the contents of two files Compare sorted data Cut out selected fields of each line of a file Differential file comparator Expand tabs to spaces Join files on some common field Data manipulation language Stream text editor Sort file data Split file into smaller files Translate characters Report repeated lines in a file Count words, lines, and characters Opens vi text editor Opens vim text editor Simple text formatter Check text for spelling error Check text for spelling error Check text for spelling error GNU project Emacs Line editor GNU project Emacs GNU project Emacs

Compressed Files:
Files may be compressed to save space. Compressed files can be created and examined:

Command compress gunzip gzip uncompress unzip zcat zcmp zdiff zmore

Description Compress files Uncompress gzipped files GNU alternative compression method Uncompress files List, test and extract compressed files in a ZIP archive Cat a compressed file Compare compressed files Compare compressed files File perusal filter for crt viewing of compressed text

Getting Information:
Various Unix manuals and documentation are available on-line. The following Shell commands give information:

Command apropos info man whatis yelp

Description Locate commands by keyword lookup Displays command information pages online Displays manual pages online Search the whatis database for complete words. GNOME help viewer

Network Communication:
These following commands are used to send and receive files from a local UNIX hosts to the remote host around the world.

Command ftp rcp rlogin rsh tftp telnet

Description File transfer program Remote file copy Remote login to a UNIX host Remote shell Trivial file transfer program Make terminal connection to another host

ssh scp sftp

Secure shell terminal or command connection Secure shell remote file copy secure shell file transfer program

Some of these commands may be restricted at your computer for security reasons.

Messages between Users:


The UNIX systems support on-screen messages to other users and world-wide electronic mail:

Command evolution mail mesg parcel pine talk write

Description GUI mail handling tool on Linux Simple send or read mail program Permit or deny messages Send files to another user Vdu-based mail utility Talk to another user Write message to another user

Programming Utilities:
The following programming tools and languages are available based on what you have installed on your Unix.

Command dbx gdb make nm size strip cb cc ctrace gcc

Description Sun debugger GNU debugger Maintain program groups and compile programs. Print program's name list Print program's sizes Remove symbol table and relocation bits C program beautifier ANSI C compiler for Suns SPARC systems C program debugger GNU ANSI C Compiler

indent bc gcl perl php py asp CC g++ javac appletvieweir netbeans sqlplus sqlldr mysql

Indent and format C program source Interactive arithmetic language processor GNU Common Lisp General purpose language Web page embedded language Python language interpreter Web page embedded language C++ compiler for Suns SPARC systems GNU C++ Compiler JAVA compiler JAVA applet viewer Java integrated development environment on Linux Run the Oracle SQL interpreter Run the Oracle SQL data loader Run the mysql SQL interpreter

Misc Commands:
These commands list or alter information about the system:

Command chfn chgrp chown date determin du echo exit finger groupadd

Description Change your finger information Change the group ownership of a file Change owner Print the date Automatically find terminal type Print amount of disk usage Echo arguments to the standard options Quit the system Print information about logged-in users Create a user group

groups homequota iostat kill last logout lun netstat passwd passwd printenv ps ps quota -v reset script script setenv stty time top tset tty umask uname uptime useradd users vmstat w

Show group memberships Show quota and file usage Report I/O statistics Send a signal to a process Show last logins of users log off UNIX List user names or login ID Show network status Change user password Change your login password Display value of a shell variable Display the status of current processes Print process status statistics Display disk usage and limits Reset terminal mode Keep script of terminal session Save the output of a command or process Set environment variables Set terminal options Time a command Display all system processes Set terminal mode Print current terminal name Show the permissions that are given to view files by default Display name of the current system Get the system up time Create a user account Print names of logged in users Report virtual memory statistics Show what logged in users are doing

who

List logged in users