Problem 1. view and modify the uuid of the hard disk under inux
View hard disk UUID
Root [/dev/Disk/by-UUID] # ls-L/dev/Disk/by-UUID
View hard disk UUID
Blkid/dev/sda5
Uuidgen returns a valid UUID, combined with tune2fs
Creates a uuid.
And write ext2, 3, 4
Partitioning:
For example, create or change sda5
UUID
(Root permission required)
Uuidgen | xargs tune2fs/dev/sda5-u
You can also
Original UUID found in
Write back partition:
Tune2fs-u c1b9d5a2-f162-11cf-9ece-0020afc76f16/dev/sda5
From http://www.linux-field.com /? P = 300
Question 2Ubuntu single user mode (you can change the root password)
kernel /vmlinuz-2.6.12-9-386 root=/dev/sda3 rw quiet init=/bin/bash |
Question 3 software and hardware links
1. Create a connection to a file
$ Ln-S/tmp/abc.txt ~ /
This command creates a link to/tmp/abc.txt with the same name as the source file in the home directory.
$ Ln-S/tmp/abc.txt ~ /ABC
This command creates a symbolic connection to/tmp/abc.txt and its name is ABC in the Home Directory (provided that there is no ABC directory in the home directory)
2. Create a symbolic connection to a directory
$ Ln-ST/tmp ~ /ABC
This command creates a symbolic connection to the/tmp directory named ABC under the home directory.
$ Ln-ST/tmp ~ /
This command creates a symbolic connection with the same name as the source folder in the home directory.
3. Create a hard connection to a file
$ Ln/tmp/abc.txt ~ /
This command creates a hard link to/tmp/abc.txt with the same name as the source file in the home directory.
$ Ln/tmp/abc.txt ~ /ABC
This command creates a hard link to/tmp/abc.txt in the home directory with the name ABC (provided that there is no ABC directory in the home directory)
Note: hard links and symbolic links
In short, symbolic links are equivalent to shortcuts in windows, and hard links are equivalent to a disaster recovery system. data is stored in two places, which is different from replication.
There is a synchronization mechanism between the two data points. Changes to one data point will be synchronized to the other in real time. In addition, if one data point is deleted, it will not be affected.
The following is a detailed description of the data to the other place:
A hard connection points to a node (inode), which is another name of an existing file. modify one of them and repair the file connected to it at the same time.
Change; when reading, writing, and deleting a hard-link file, the effect is the same as that of a symbolic link. However, if we delete the source file of the hard link file,
The hard link file still exists and the original content is retained. At this time, the system "forgot" that it was a hard-linked file and used it
A common file.
There are two restrictions on hard-link files:
1. Hard links cannot be created for directories;
2. A link can be created only between files in the same file system.
Problem 4 mount and mount Chinese garbled characters
Sudo Mount/dev/SDC/mnt/USB-O iocharset = utf8 |