Linux Notes 01

linux directory structure:

Only a linux directory.

usr: equivalent to ProgramFiles;

etc: storage system configuration

root: Administrator (super user) directory,

home: storage of other user's directory;

lib: Shared packet;

boot: system startup file:

tmp: Temporary files


Basic Commands

pwd: Print the current directory:

cd /: root directory;

ll: view the contents of the current directory;

ls (list) Function: to list contents;

Disk management commands:

. :Current directory

.. :Parent directory

ls:

-a(-all) : So the file directory, including hidden special directory

Beginning with the point of hidden files

-l: a detailed list of formats

-t: Change the time and Sorting files and directories

-r: reverse sequencing

--help: Online Help

list: list

ll: lists the files in the current directory

ls -al: lists the files in the current directory, including hidden files special directory

ll / bin /: lists the files in the bin directory

cd command:

cd ~: Current user directory

cd /: root directory

cd -: last visited directory

cd ..: parent directory

cd: The current default user directory

<Touch 1.txt> Create a txt file

Clear screen

mkdir (create directory) ':

-p: parent directory does not exist to generate the parent directory

-v: displays detailed information during command execution

View the contents of the file command

cat command:

cat: show the file contents

(For file contents less)

more command:

Page display file contents:

Syntax more (file name)

enter: n rows down, needs to be defined, the default is a line

Spacebar: scroll down a screen or ctrl + f

b: Returns to the previous screen or ctrl + b

q: Quit more

less:

-m: The percentage is similar to the more command

-n: display the line number

operating:

tall order;

For displaying the contents of the file at the end, when the file is not specified, the processing as input information, used to view the log file.

Format: tall necessary parameters [] [] [file] parameter selection

tail -n <line number> shows the number of rows

-f read cycle

Guess you like

Origin www.cnblogs.com/hwx1999/p/10993504.html