Linux-basic concepts of file systems

Source: Internet
Author: User

Linux-basic concepts of file systems

In linux, all data is stored in a file and stored in a directory with a tree structure.

(1) file type

1. Common files

Including text files, source code files, and executable files. Linux does not distinguish between text and binary files.

2. Directory

Similar to the directory folder in windows.

3. Device Files

Character Device Files: Files starting with "c" can directly transmit data.

Block Device Files: Files starting with "B", read and write data blocks with memory buffer.

(2) viewing files

Command: ls-l

Drwxrwxr-x 2 Root Root 4096 DEC 12 0910: 10 Reader
File Type Number of Files File owner Group File Size Creation or modification time File or directory name
File Type: file attributes + 3 file owner permissions + 3 group permissions + 3 others Permissions

R: readable

W: writable

X: executable

(3) file editing

Command for creating or editing a file: vi filename

Vi editor mode: Command mode, edit mode, and end mode (you can enter the ex command)

Tip: After opening the file, enter I to enter the editing mode, click ESC to exit the editing mode, enter q to exit the file, and enter wq to save and exit the file.

(4) file operation commands

Cp: copy an object

Mv: Rename or move a file

Rm: delete an object

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.