zoukankan      html  css  js  c++  java
  • UNIX 常用命令

    UNIX 常用命令

    50個最常用的Unix/Linux命令

    tar grep find ssh sed
    awk vim diff sort export
    args ls pwd cd gzip
    bzip2 unzip shutdown ftp crontab
    service ps free top df
    kill rm cp mv cat
    mount chmod chown passwd mkdir
    ifconfig uname whereis whatis locate
    man tail less su mysql
    yum rpm ping date wget

    文件和目錄:

    這些命令允許你創建的目錄和處理文件。

    命令 描述
    cat 顯示文件內容
    cd 改變當前目錄
    chgrp 改變文件或目錄之群組擁有權
    chmod 改變文件或目錄屬性
    cp 拷貝檔案
    file 顯示檔案型態
    find 找尋檔案
    grep 在本文檔中找尋字串
    head 顯示文件的前幾行
    ln 連結檔案或目錄
    ls 將某一個目錄的內容顯示出來
    mkdir 創建目錄
    more 以分頁形式顯示數據
    mv 搬移或重新命名檔案
    od 以八進位查看檔案內容
    pwd 顯示現在工作目錄的路徑
    rm 刪除文件或目錄
    rmdir 刪除子目錄,目錄內須無檔案
    tail 顯示文件的最後幾行
    touch 改變文件或目錄之最後修改時間

    操作数据:

    可以比較改變文件的內容,並用下面的命令。

    命令 描述
    awk 模式和扫描处理语言
    cmp 比較兩個文件的內容
    comm 比較排序數據
    cut 挑出檔案的部份欄資料
    diff 比較文件或目錄之內容
    dircmp 對二個目錄下的檔案進行比較
    expand Expand tabs to spaces
    join 結合兩個有共同的連結欄位的檔案
    perl 數據操作語言
    sed Stream text editor
    sort 排序檔案內容
    split 將文件拆分為較小的文件
    csplit 將一個大的檔案分割成若干個較小的檔
    tar 將檔案以保存檔方式從磁帶或磁碟中取出或存放
    tr 字元轉換的處理
    uniq 去除檔案相同的行(須相鄰)
    wc 計算檔案的行數、字數及字元數
    vi 開啟 vi 文件編輯器
    vim Opens vim text editor
    fmt Simple text formatter
    spell Check text for spelling error
    ispell Check text for spelling error
    ispell Check text for spelling error
    emacs GNU project Emacs
    ex, edit Line editor
    emacs GNU project Emacs
    emacs GNU project Emacs

    压缩文件:

    文件可能被壓縮以節省空間。壓縮文件,可以創建和檢查:

    命令 描述
    compress 將檔案壓縮成 *.Z 格式
    gunzip 解壓縮gzip壓縮文件
    gzip 壓縮方法,壓縮的檔名為 .gz
    uncompress 將 *.Z 格式的壓縮檔解壓
    unzip List, test and extract compressed files in a ZIP archive
    zcat 顯示壓縮檔案的內容
    cpio UNIX作業系統的一個檔案備份程式及檔案格式
    zcmp Compare compressed files
    zdiff Compare compressed files
    zmore File perusal filter for crt viewing of compressed text
    pack 對檔案進行壓縮
    pcat 顯示壓縮檔的資料
    unpack 對檔案進行解壓縮

    获取信息:

    各種UNIX手冊和文檔上線。下面的 Shell 命令給出的信息:

    命令 描述
    apropos Locate commands by keyword lookup
    info Displays command information pages online
    man 顯示命令用法
    whatis Search the whatis database for complete words.
    yelp GNOME help viewer

    网络通信:

    這些命令是用來發送和接收文件从远程主機到本地UNIX主機。

    命令 描述
    ftp File transfer program
    rcp 拷貝文件或目錄至遠端工作站,或自遠端工作站拷貝文件或目錄
    rlogin 進入遠端電腦系統
    rsh Remote shell
    tftp Trivial file transfer program
    telnet 使終端連接到另一個主機
    ssh Secure shell terminal or command connection
    scp Secure shell remote file copy
    sftp secure shell file transfer program
    出於安全原因,有些命令在您的計算機可能會受到限制。

    用戶之間的消息:

    UNIX 系統支持的屏幕上的消息給其他用戶和世界各地的電子郵箱:

    命令 描述
    evolution Linux上的GUI郵件處理工具
    mail 發送或讀郵件程序
    mesg 允許或拒絕郵件
    parcel Send files to another user
    pine Vdu-based mail utility
    talk 與其他用戶通話
    write 向其他用戶寫信息

    編程工具:

    下面的編程語言和工具都是基於你已經安裝到你的 Unix。

    命令 描述
    dbx Sun debugger
    gdb GNU debugger
    make Maintain program groups and compile programs.
    nm Print program’s name list
    size Print program’s sizes
    strip Remove symbol table and relocation bits
    cb C program beautifier
    cc ANSI C compiler for Suns SPARC systems
    ctrace C program debugger
    gcc GNU ANSI C Compiler
    indent Indent and format C program source
    bc Interactive arithmetic language processor
    gcl GNU Common Lisp
    perl General purpose language
    php Web page embedded language
    py Python language interpreter
    asp Web page embedded language
    CC C++ compiler for Suns SPARC systems
    g++ GNU C++ Compiler
    javac JAVA compiler
    appletvieweir JAVA applet viewer
    netbeans Java integrated development environment on Linux
    sqlplus Run the Oracle SQL interpreter
    sqlldr Run the Oracle SQL data loader
    mysql Run the mysql SQL interpreter

    系统命令:

    這些命令列出或改變有關系統的信息:

    命令 描述
    chfn Change your finger information
    chgrp Change the group ownership of a file
    chown 改變檔案的擁有者
    date Print the date
    determin Automatically find terminal type
    du 顯示目錄所使用的磁碟空間
    echo Echo arguments to the standard options
    exit Quit the system
    finger 可查詢本地機器或遠方機器使用者簡要資料
    groupadd Create a user group
    groups 檢查自己所屬的群組名稱及群組成員
    homequota Show quota and file usage
    iostat Report I/O statistics
    kill 停止處理程序,通常先用 ps 命令查得 Process ID,再殺之
    last Show last logins of users
    logout 登出帳號
    lun List user names or login ID
    netstat Show network status
    passwd 更改密碼
    printenv Display value of a shell variable
    ps Display the status of current processes
    ps Print process status statistics
    quota 顯示自己可用磁碟空間大小和限制
    quotaon 設定檔案系統的使用者配額
    quotaoff 關閉檔案系統的使用者配額
    volcopy 拷貝整個檔案系統到磁帶或者另一個磁碟
    reset Reset terminal mode
    script Keep script of terminal session
    script Save the output of a command or process
    setenv 查看或設定環境變數
    stty Set terminal options
    time Time a command
    top Display all system processes
    tset Set terminal mode
    tty Print current terminal name
    umask 顯示默認查看文件的權限
    uname Display name of the current system
    uptime Get the system up time
    useradd Create a user account
    users Print names of logged in users
    vmstat Report virtual memory statistics
    w Show what logged in users are doing
    who List logged in users
    lpr 一般文件之列印
    lpq 檢查印表機狀態,及列印工作順序編號和使用者名稱
    lprm 刪除印表機內之列印工作
    fsck 檔案系統狀態報告與錯誤檢修

  • 相关阅读:
    Spring-四种常用注解
    Spring-IOC
    Spring-bean 的管理细节
    Android R.java文件
    MySQL | windows10 安装MySQL : 无法将“mysql”项识别为 cmdlet、函数、脚本....
    统计知识 | 决定系数 R方、调整后的R方、F值
    R | R语言表达式中常用的符号
    回归分析 | R语言回归算法、模型诊断
    R | 探索性数据分析 EDA
    R语言基础 | 概率分布的表示方法
  • 原文地址:https://www.cnblogs.com/guodoudou/p/13466009.html
Copyright © 2011-2022 走看看