linux browse directories and configuration files

  1. View catalog, view file properties
    What law have under 1) to view the root directory / subdirectory which documents or to observe the color

    ls /

    2) shows the results, comparison / bin, / usr / bin / directory in long format detailed properties

    ls -ld / bin / usr / bin / directory itself [-d display only]

    3) list of all documents in the current directory (including hidden files)

    ls -A

    4) View / etc / begin the re, ending .conf file, identifying respective sizes

    ls -lh /etc/re*.conf

  2. View text file contents
    1) displays the contents of the file / etc / redhat-release of [System version]
    2) to display the file / etc / hostname content [hostname]
    3) displays the file / proc / cpuinfo content [CPU information]
    from the results recognized by the CPU core processor number, model, frequency

    cat /proc/cpuinfo

    processor: 0 // CPU core ID
    vendor_id: GenuineIntel // Manufacturer Information
    CPU Family:. 6
    Model: 94
    Model name: the Intel (R & lt) Core ((TM)) i5-6500 the CPU @ 3.20GHz
    Stepping:. 3
    microcode A: 0xBA
    CPU MHz: 3198.786 // CPU main frequency
    cache size: 6144 KB // secondary cache
    physical id: 0 // physical CPU numbers
    !!!! to view the contents of large files, it is recommended to use less (tabbed browsing, q quit)
    3, mkdir to create a directory
    create the following directory structure
    / protected / Project / tts10 /
    / Notes / Cloud /

    mkdir -p /protected/project/tts10/ /notes/cloud/

4, touch creates the file
create the following empty file rday01.txt, day02.txt

touch day01.txt day02.txt

  1. All the files ending in .txt lists / notes / cloud / directory

    ls /notes/cloud/*.txt

    Note:
    Wildcard: * Use special symbols to indicate uncertainty ,? the name of
    the current directory -
    the current directory - ..
    5, copy

    cp copied document A target document B

    cp -rp copied directory and file destination folder ...

6, delete

rmdir directory name (remove directory)

rm filename (deleting files)

rm -r directory name (remove directory)

rm -rf delete directories and files do not prompt

7, a mobile / rename

A document is moved mv target document B

mv moved document destination folder ...

Guess you like

Origin blog.51cto.com/14484693/2428494