Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux basic notes

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Basic structure of Linux

File types and file system types

File Properties for Linux

Linux directory structure

kernel→ runtime libraries, system programs →shell→ utility programs

ubuntu→EXT4

SWAP file systems are used only in Linux swap partitions

Linux operating systems require at least two partitions: the root partition (EXT4 format) and memory swap.

Zoning (SWAP format)

Linux File Properties

File name: It can be composed of letters, numbers, underscores, dots, etc.

File type: ordinary file, directory file, link file, equipment file, etc.

File type attribute: embodied in characters

'--' stands for regular file

'd' stands for directory file

'l' stands for link file link

'b' stands for block device file

'c' stands for Character device file

'p' stands for pipefile

Linux directory structure

Linux root directory structure

Linux's First Level Standards Directory (FHS)

/ /sbin /lib /etc / dev /root /usr /var (log mail)

/proc (virtual directory)/opt (third party)/mnt

Linux initialization configuration

Initial user login

User configuration of usage environment, network and time configuration

Installation of application packages in the environment

Linux command overview

command format

command assistance

command word option parameter of command (option) operation parameter of command

Format:

command program name command option description requirements for command command parameters, description

object of command

command assistance

Use man to read help manual page 8

Use the command "--help" option

Use the info command to read the help information page

Use the help command to view help information for internal commands

Files starting with dots are hidden files ls -a can be viewed

type Check if the command is external. Only internal commands use help.

Linux Directory Operations

Path concept of directory

Reality and switching

Add and copy

delete

Move and rename

Path is the directory path through which the file was found

A relative path is a path form expressed from the current working directory

An absolute path is a path form expressed from the root directory "/"

The target file can be finally found through both relative and absolute paths, and the effect is good.

same

Contents Display Command: ls

The default lists the files and directory entry information contained in the current directory

Common options parameter "-l" lists "verbose information" for file and directory entries

Common option parameter "-d" lists the self information of the current directory entry, often and "_l"

used

-ld

cd:change directory

pwd: Display current directory

mkdir: new directory-p recursively create multi-level directories

cp: copy, rename-a for all copies-f forced copy *cp files cannot be copied

Unless you add parameter-a (summarized in your own study)

Empty directory delete rmdir

-p recursively delete the wrong layer empty ml

Non-empty directory delete: rm -rf

-r Recursive deletion

-f Forced deletion

-ri When deleting, there is a prompt to delete layer by layer

Move rename: mv change path is move rename is only change file name change path change

File name Change file name when directory is moved

cp xx b/n: copy xx to b folder and rename it n

mv xx/b n: move b to n under xx file

mv xx/b n/v: move b to n under xx file and rename it v

File display and filtering

Add and copy files

Deletion of files

Move, rename and search files

Editing of text files

cat: full screen display of file contents command-t: display special characters in files ctrl+d knot

beam

more: Split screen display, only one screen of information is displayed at a time. Press q to exit halfway. Press space to display the next screen.

Pages can only go down, not up

less: scroll view press up and down key to view

head: displays the first 10 lines for file header view, -n specifies the number of lines

tail: tail view-f tail latest information press ctrl+c exit-n specify the number of rows

grep: filter the contents of the file-v reverse filter out lines that do not contain the specified keyword-i will

Filter by ignoring case

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report