Linux Sysadmin Basics 02 -- Basic Commands

  • pwd [-LP]

    Print the name of the current working directory.

  • ls [OPTION]… [FILE]…

    List information about the FILEs (the current directory by default).

    -a, --all        do not ignore entries starting with .

    -l        use a long listing format

    -h, --human-readable        with -l and/or -s, print human readable sizes (e.g., 1K  234M  2G)

  • cd [-L|[-P [-e]] [-@]] [dir]

    Change the shell working directory.

    Change the current directory to DIR. The default DIR is the value of the HOME shell variable.


  • touch [OPTION]… FILE…

    Update the access and modification times of each FILE to the current time.

    A FILE argument that does not exist is created empty, unless -c or -h is supplied.

  • cat [OPTION]… [FILE]…

    Concatenate FILE(s) to standard output.

  • mkdir [OPTION]… DIRECTORY…

    Make directories

    Create the DIRECTORY(ies), if they do not already exist.

    -p, --parents        no error if existing, make parent directories as needed

  • mv [OPTION]… [-T] SOURCE DEST

    or mv [OPTION]… SOURCE… DIRECTORY

    or mv [OPTION]… -t DIRECTORY SOURCE…

    Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.

  • rm [OPTION]… [FILE]…

    Remove (unlink) the FILE(s).

    • -f, --force        ignore nonexistent files and arguments, never prompt

    • -r, -R, --recursive        remove directories and their contents recursively

  • rmdir [OPTION]... DIRECTORY...

    Remove the DIRECTORY(ies), if they are empty.

  • cp [OPTION]... [-T] SOURCE DEST
    or: cp [OPTION]... SOURCE... DIRECTORY
    or: cp [OPTION]... -t DIRECTORY SOURCE...

    Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.


  • clear [OPTION]

  • man [OPTION...] [SECTION] PAGE...

    An interface to the on-line reference manuals.

posted @ 2021-01-26 17:07  Blind  阅读(60)  评论(0编辑  收藏  举报