×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    UnixCommands: Difference between revisions

    Content added Content deleted
    imported>mutante
    mNo edit summary
    imported>mutante
    mNo edit summary
    Line 28:
    *ManPages
     
     
    <pre>
    Command/Syntax What it will do
     
    *[[awk]] / [[nawk]] [options] file scan for patterns in a file and process the results
    *[[cat]] [options] file concatenate (list) a file
    *[[cd]] [directory] change directory
    *[[chgrp]] [options] group file change the group of the file
    *[[chmod]] [options] file change file or directory access permissions
    *[[chown]] [options] owner file change the ownership of a file; can only be done by the superuser
    *[[chsh]] (passwd -e/-s) username login_shell change the user's login shell (often only by the superuser)
    *[[cmp]] [options] file1 file2 compare two files and list where differences occur (text or binary files)
    *[[compress]] [options] file compress file and save it as file.Z
    *[[cp]] [options] file1 file2 copy file1 into file2; file2 shouldn't already exist. This command creates or overwrites file2.
    *[[cut]] (options) [file(s)] cut specified field(s)/character(s) from lines in file(s)
    *[[date]] [options] report the current date and time
    *[[dd]] [if=infile] [of=outfile] [operand=value] copy a file, converting between ASCII and EBCDIC or swapping byte order, as specified
    *[[diff]] [options] file1 file2 compare the two files and display the differences (text files only)
    *[[df]] [options] [resource] report the summary of disk blocks and inodes free and in use
    *[[du]] [options] [directory or file] report amount of disk space in use
    *[[echo]] [text string] echo the text string to stdout
    *[[ed]] or ex [options] file Unix line editors
    *[[emacs]] [options] file full-screen editor
    *[[expr]] arguments evaluate the arguments. Used to do arithmetic, etc. in the shell.
    *[[file]] [options] file classify the file type
    *[[find]] directory [options] [actions] find files matching a type or pattern
    *[[finger]] [options] user[@hostname] report information about users on local and remote machines
    *[[ftp]] [options] host transfer file(s) using file transfer protocol
    *[[grep]] [options] 'search string' argument
    *[[egrep]] [options] 'search string' argument
     
    egrep*[[fgrep]] [options] 'search string' argument, search the argument (in this case probably a file) for all occurrences of the search string, and list them.
    *[[gzip]] [options] file
     
    fgrep*[[gunzip]] [options] 'search string' argumentfile
    *[[zcat]] [options] file, compress or uncompress a file. Compressed files are stored with a .gz ending
    search the argument (in this case probably a file) for all occurrences of the search string, and list them.
    *[[head]] [-number] file display the first 10 (or number of) lines of a file
    gzip [options] file
    *[[hostname display]] or set (super-user only) the name of the current machine
     
    *[[kill]] [options] [-SIGNAL] [pid#] [%job] send a signal to the process with the process id number (pid#) or job control number (%n). The default signal is to kill the process.
    gunzip [options] file
    *[[ln]] [options] source_file target link the source_file to the target
     
    zcat*[[lpq]] [options] file
    *[[lpstat]] [options], show the status of print jobs
    compress or uncompress a file. Compressed files are stored with a .gz ending
    *[[lpr]] [options] file
    head [-number] file display the first 10 (or number of) lines of a file
    *[[lp]] [options] file, print to defined printer
    hostname display or set (super-user only) the name of the current machine
    *[[lprm]] [options]
    kill [options] [-SIGNAL] [pid#] [%job] send a signal to the process with the process id number (pid#) or job control number (%n). The default signal is to kill the process.
    ln*[[cancel]] [options], source_fileremove target linka theprint source_filejob tofrom the targetprint queue
    *[[ls]] [options] [directory or file] list directory contents or file permissions
    lpq [options]
    *[[mail]] [options] [user]
     
    lpstat*[[mailx]] [options] [user]
    *[[Mail]] [options] [user], simple email utility available on [[Unix]] systems. Type a period as the first character on a new line to send message out, question mark for help.
    show the status of print jobs
    *[[man]] [options] command show the manual (man) page for a command
    lpr [options] file
    *[[mkdir]] [options] directory make a directory
     
    lp*[[more]] [options] file
    *[[less]] [options] file
    print to defined printer
    lprm*[[pg]] [options] file page through a text file
    *[[mv]] [options] file1 file2 move file1 into file2
     
    *[[od]] [options] file octal dump a binary file, in octal, ASCII, hex, decimal, or character mode.
    cancel [options]
    *[[passwd]] [options] set or change your password
    remove a print job from the print queue
    ls*[[paste]] [options] [directory or file] listpaste directoryfield(s) contentsonto orthe filelines permissionsin file
    *[[pr]] [options] file filter the file and print it on the terminal
    mail [options] [user]
    *[[ps]] [options] show status of active processes
     
    *[[pwd print]] working (current) directory
    mailx [options] [user]
    *[[rcp]] [options] hostname remotely copy files from this machine to another machine
     
    *[[rlogin]] [options] hostname login remotely to another machine
    Mail [options] [user]
    *[[rm]] [options] file remove (delete) a file or directory (-r recursively deletes the directory and its contents) (-i prompts before removing files)
    simple email utility available on Unix systems. Type a period as the first character on a new line to send message out, question mark for help.
    man*[[rmdir]] [options] commanddirectory show the manual (man) page forremove a commanddirectory
    mkdir*[[rsh]] [options] directoryhostname makeremote shell to run on aanother directorymachine
    *[[script]] file saves everything that appears on the screen to file until exit is executed
    more [options] file
    *[[sed]] [options] file stream editor for editing files from a script or from the command line
     
    *[[sort]] [options] file sort the lines of the file according to the options chosen
    less [options] file
    *[[source]] file
     
    *[[.]] file read commands from the file and execute them in the current shell. source: C shell, .: Bourne shell.
    pg [options] file
    *[[strings]] [options] file report any sequence of 4 or more printable characters ending in <NL> or <NULL>. Usually used to search binary files for ASCII strings.
    page through a text file
    *[[stty]] [options] set or display terminal control options
    mv [options] file1 file2 move file1 into file2
    od*[[tail]] [options] file octaldisplay dumpthe alast binaryfew file,lines in(or octal,parts) ASCII,of hex,a decimal, or character mode.file
    *[[tar]] key[options] [file(s)] tape archiver--refer to man pages for details on creating, listing, and retrieving from archive files. Tar files can be stored on tape or disk.
    passwd [options] set or change your password
    paste*[[tee]] [options] file pastecopy field(s)stdout ontoto theone linesor inmore filefiles
    *[[telnet]] [host [port]] communicate with another host using telnet protocol
    pr [options] file filter the file and print it on the terminal
    *[[touch]] [options] [date] file create an empty file, or update the access time of an existing file
    ps [options] show status of active processes
    *[[tr]] [options] string1 string2 translate the characters in string1 from stdin into those in string2 in stdout
    pwd print working (current) directory
    *[[uncompress]] file.Z uncompress file.Z and save it as a file
    rcp [options] hostname remotely copy files from this machine to another machine
    rlogin*[[uniq]] [options] hostnamefile loginremove repeated remotelylines toin anothera machinefile
    *[[uudecode]] [file] decode a uuencoded file, recreating the original file
    rm [options] file remove (delete) a file or directory (-r recursively deletes the directory and its contents) (-i prompts before removing files)
    *[[uuencode]] [file] new_name encode binary file to 7-bit ASCII, useful when sending via email, to be decoded as new_name at destination
    rmdir [options] directory remove a directory
    rsh*[[vi]] [options] hostnamefile remote shell to run onvisual, anotherfull-screen machineeditor
    *[[wc]] [options] [file(s)] display word (or character or line) count for file(s)
    script file saves everything that appears on the screen to file until exit is executed
    sed*[[whereis]] [options] filecommand streamreport editorthe forbinary, editingsource, filesand fromman apage scriptlocations or fromfor the command linenamed
    sort *[[optionswhich]] filecommand sortreports the linespath ofto the filecommand according toor the optionsshell alias in chosenuse
    *[[who]] or w report who is logged in and what processes are running
    source file
    *[[zcat]] file.Z concatenate (list) uncompressed file to screen, leaving file compressed on disk
     
    . file
    read commands from the file and execute them in the current shell. source: C shell, .: Bourne shell.
    strings [options] file report any sequence of 4 or more printable characters ending in <NL> or <NULL>. Usually used to search binary files for ASCII strings.
    stty [options] set or display terminal control options
    tail [options] file display the last few lines (or parts) of a file
    tar key[options] [file(s)] tape archiver--refer to man pages for details on creating, listing, and retrieving from archive files. Tar files can be stored on tape or disk.
    tee [options] file copy stdout to one or more files
    telnet [host [port]] communicate with another host using telnet protocol
    touch [options] [date] file create an empty file, or update the access time of an existing file
    tr [options] string1 string2 translate the characters in string1 from stdin into those in string2 in stdout
    uncompress file.Z uncompress file.Z and save it as a file
    uniq [options] file remove repeated lines in a file
    uudecode [file] decode a uuencoded file, recreating the original file
    uuencode [file] new_name encode binary file to 7-bit ASCII, useful when sending via email, to be decoded as new_name at destination
    vi [options] file visual, full-screen editor
    wc [options] [file(s)] display word (or character or line) count for file(s)
    whereis [options] command report the binary, source, and man page locations for the command named
    which command reports the path to the command or the shell alias in use
    who or w report who is logged in and what processes are running
    zcat file.Z concatenate (list) uncompressed file to screen, leaving file compressed on disk
    </pre>
     
    <tasks>

    Revision as of 18:12, 23 March 2006

    Unix

    UnixCommands/Kill

    UnixCommands/Cat

    UnixCommands/Screen

    Compression

    Filters

    Redirection

    Chmod

    ViewFiles

    VIvisualEdit

    SedStreamEditor

    AwkPatternMatching

    SinkFiles


    • ManPages


    Command/Syntax What it will do

    • awk / nawk [options] file scan for patterns in a file and process the results
    • cat [options] file concatenate (list) a file
    • cd [directory] change directory
    • chgrp [options] group file change the group of the file
    • chmod [options] file change file or directory access permissions
    • chown [options] owner file change the ownership of a file; can only be done by the superuser
    • chsh (passwd -e/-s) username login_shell change the user's login shell (often only by the superuser)
    • cmp [options] file1 file2 compare two files and list where differences occur (text or binary files)
    • compress [options] file compress file and save it as file.Z
    • cp [options] file1 file2 copy file1 into file2; file2 shouldn't already exist. This command creates or overwrites file2.
    • cut (options) [file(s)] cut specified field(s)/character(s) from lines in file(s)
    • date [options] report the current date and time
    • dd [if=infile] [of=outfile] [operand=value] copy a file, converting between ASCII and EBCDIC or swapping byte order, as specified
    • diff [options] file1 file2 compare the two files and display the differences (text files only)
    • df [options] [resource] report the summary of disk blocks and inodes free and in use
    • du [options] [directory or file] report amount of disk space in use
    • echo [text string] echo the text string to stdout
    • ed or ex [options] file Unix line editors
    • emacs [options] file full-screen editor
    • expr arguments evaluate the arguments. Used to do arithmetic, etc. in the shell.
    • file [options] file classify the file type
    • find directory [options] [actions] find files matching a type or pattern
    • finger [options] user[@hostname] report information about users on local and remote machines
    • ftp [options] host transfer file(s) using file transfer protocol
    • grep [options] 'search string' argument
    • egrep [options] 'search string' argument
    • fgrep [options] 'search string' argument, search the argument (in this case probably a file) for all occurrences of the search string, and list them.
    • gzip [options] file
    • gunzip [options] file
    • zcat [options] file, compress or uncompress a file. Compressed files are stored with a .gz ending
    • head [-number] file display the first 10 (or number of) lines of a file
    • [[hostname display]] or set (super-user only) the name of the current machine
    • kill [options] [-SIGNAL] [pid#] [%job] send a signal to the process with the process id number (pid#) or job control number (%n). The default signal is to kill the process.
    • ln [options] source_file target link the source_file to the target
    • lpq [options]
    • lpstat [options], show the status of print jobs
    • lpr [options] file
    • lp [options] file, print to defined printer
    • lprm [options]
    • cancel [options], remove a print job from the print queue
    • ls [options] [directory or file] list directory contents or file permissions
    • mail [options] [user]
    • mailx [options] [user]
    • Mail [options] [user], simple email utility available on Unix systems. Type a period as the first character on a new line to send message out, question mark for help.
    • man [options] command show the manual (man) page for a command
    • mkdir [options] directory make a directory
    • more [options] file
    • less [options] file
    • pg [options] file page through a text file
    • mv [options] file1 file2 move file1 into file2
    • od [options] file octal dump a binary file, in octal, ASCII, hex, decimal, or character mode.
    • passwd [options] set or change your password
    • paste [options] file paste field(s) onto the lines in file
    • pr [options] file filter the file and print it on the terminal
    • ps [options] show status of active processes
    • [[pwd print]] working (current) directory
    • rcp [options] hostname remotely copy files from this machine to another machine
    • rlogin [options] hostname login remotely to another machine
    • rm [options] file remove (delete) a file or directory (-r recursively deletes the directory and its contents) (-i prompts before removing files)
    • rmdir [options] directory remove a directory
    • rsh [options] hostname remote shell to run on another machine
    • script file saves everything that appears on the screen to file until exit is executed
    • sed [options] file stream editor for editing files from a script or from the command line
    • sort [options] file sort the lines of the file according to the options chosen
    • source file
    • [[.]] file read commands from the file and execute them in the current shell. source: C shell, .: Bourne shell.
    • strings [options] file report any sequence of 4 or more printable characters ending in <NL> or <NULL>. Usually used to search binary files for ASCII strings.
    • stty [options] set or display terminal control options
    • tail [options] file display the last few lines (or parts) of a file
    • tar key[options] [file(s)] tape archiver--refer to man pages for details on creating, listing, and retrieving from archive files. Tar files can be stored on tape or disk.
    • tee [options] file copy stdout to one or more files
    • telnet [host [port]] communicate with another host using telnet protocol
    • touch [options] [date] file create an empty file, or update the access time of an existing file
    • tr [options] string1 string2 translate the characters in string1 from stdin into those in string2 in stdout
    • uncompress file.Z uncompress file.Z and save it as a file
    • uniq [options] file remove repeated lines in a file
    • uudecode [file] decode a uuencoded file, recreating the original file
    • uuencode [file] new_name encode binary file to 7-bit ASCII, useful when sending via email, to be decoded as new_name at destination
    • vi [options] file visual, full-screen editor
    • wc [options] [file(s)] display word (or character or line) count for file(s)
    • whereis [options] command report the binary, source, and man page locations for the command named
    • which command reports the path to the command or the shell alias in use
    • who or w report who is logged in and what processes are running
    • zcat file.Z concatenate (list) uncompressed file to screen, leaving file compressed on disk


    <tasks> [ ] needs wiki formatting,table </tasks>

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.