devices, links, find

Source: Internet
Author: User

############ #1. Device Access

1. identification of equipment

/DEV/SDA # # # The first serial drive in the system

/dev/hda # # # System in the first block of the hard disk

/dev/hdb # # # System in the second block of the hard drive

/dev/cdrom # # System optical Drive

/dev/mapper/xxx # # Virtual Appliance

/DEV/SDB1 General will be the U disk, if there is a sdb exists, it is sdc1, generally mounted in /run/ MEDIA/XX ( user name )/ next

2. use of the device

# #"Discovery of equipment"# #

fdisk-l # # View real-world devices

cat/proc/partitions # # devices that the system can identify

Blkid # # Device ID used by the system to mount

DF # # to see what the device is used by the system

n sub-party )  -h ( 10 n this side)

du -H (display unit) -S (statistics directory itself only) file|dir # # statistics File size

# #"Use of equipment"# #

1. mounting of the device

Mount Equipment mount point

Mount /DEV/SDB1 /mnt # mount the first partition of the second hard drive in the system to the /mnt directory

2. Uninstalling the device

Umout Equipment | mount point

If the following conditions occur:

[Email protected] ~]# UMOUNT/DEV/SDB1

Umount:/home/kiosk/desktop/photo:target is busy.

(In some cases useful info about processes

The device is found by lsof (8) or fuser (1))

Solve:

FUSER-KVM Equipment | mount point -K Kill,-v Show details,-m scan device

############## #2. Soft and Hard links

Ls-i # # View file node number

ln-s/file/file1 # # Soft links

Ln/file/file1 # # Hard links

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/89/87/wKiom1gWz3nhIQ9OAAFMsQpwhH4061.png-wh_500x0-wm_3 -wmp_4-s_498063299.png "title=" image 1.png "alt=" wkiom1gwz3nhiq9oaafmsqpwhh4061.png-wh_50 "/>

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/89/87/wKiom1gWz5DgqdPkAACJYOzMKOo350.png-wh_500x0-wm_3 -wmp_4-s_2753074457.png "title=" image 2.png "alt=" wkiom1gwz5dgqdpkaacjyozmkoo350.png-wh_50 "/>

Soft links

Soft links are shortcuts to files, in order to save device storage fast

ln-s file links

Explain:

Save data regions (spanning partitions) multiple nodes corresponding to the same data region

Soft links save space in the data area, two files have different node numbers, but one is accessed through another file, so when the original file is deleted, the linked file will not be able to access the file

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/85/wKioL1gWz6KRVHxjAAFLzxmNoXc230.png-wh_500x0-wm_3 -wmp_4-s_2604211459.png "title=" image 3.png "alt=" wkiol1gwz6krvhxjaaflzxmnoxc230.png-wh_50 "/>

Hard Links

A hard link is a copy of the file in order to save the device node number

LN file links

Understand:

Save node numbers (not spanning partitions) a data region corresponds to multiple nodes.

Hard links Save the node number, two files is a node number, but when the original file is deleted, the linked file still exists

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/89/85/wKioL1gWz7mDlacFAAD_rrpnGKo887.png-wh_500x0-wm_3 -wmp_4-s_994736904.png "title=" image 4.png "alt=" wkiol1gwz7mdlacfaad_rrpngko887.png-wh_50 "/>

############ #3. File Lookup

1.Locate filename# # # searches the file database for the filename information,updatedb Update the file database

2.

Find Find Location - conditions Condition Value -exec action {} \;

-name

-not conditions

-user

-group

-size

-perm

--maxdepth

--mindepth

-A

-O

set up 5 files, change so all groups of people

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/89/85/wKioL1gWz82CqPJWAACMh9VUlTM736.png-wh_500x0-wm_3 -wmp_4-s_1368564725.png "title=" image 5.png "alt=" wkiol1gwz82cqpjwaacmh9vultm736.png-wh_50 "/>

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/89/87/wKiom1gWz-SS-vntAAD__my7ERU038.png-wh_500x0-wm_3 -wmp_4-s_3558253911.png "title=" image 6.png "alt=" wkiom1gwz-ss-vntaad__my7eru038.png-wh_50 "/>

DD If=/dev/zero of=/mnt/file bs=1024 count=10// cut out an empty block

DD # # data interception

if # # data Template

of # # data storage file

BS # # data block size

Count # # number of data blocks


650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/89/85/wKioL1gW0GyTw4MYAAFs1T-iM60009.png-wh_500x0-wm_3 -wmp_4-s_903768088.png "title=" image 7.png "alt=" wkiol1gw0gytw4myaafs1t-im60009.png-wh_50 "/>

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/89/87/wKiom1gW0HrC3BtLAABit0hwopQ098.png-wh_500x0-wm_3 -wmp_4-s_3328505735.png "title=" image 8.png "alt=" wkiom1gw0hrc3btlaabit0hwopq098.png-wh_50 "/>


devices, links, find

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.