Learning from linux-disk management and learning from linux
1: df is used to view the capacity information of mounted disks.
-I. View inodes usage
-H is displayed in proper units
-K-m is displayed in k M units.
2: view the space occupied by a file or directory by du [-abckmsh] [file name and directory name]
The du + directory only lists the sizes of directories and Their subdirectories.
The du-a + directory
Linux disk relationship knowledge and linux disk experience
I have learned more or less about linux disk management, including hard disks, logical disks, and lvm, however, I encountered a lot of problems and confusions when I checked the linux database yesterday. I also reviewed the related knowledge.
First, let's take
-sector of the hard disk are the primary boot sectors. fdisk will write 512 bytes of records here, that is, MBR records.
MBR Partition Table: (MBR meaning: Master Boot Record, Master Boot Record)
Maximum supported volumes: 2 TB (T; terabytes, 1 TB = 1024 GB)
Limit on partitions: a maximum of four primary partitions or three primary partitions can be added with an extended partition (unlimited logical drives are supported in the extended partition)
GPT
partition mode, up to 2TB only, up to the primary partition primary plus the extended partition extended is 4, want to multiple partitions need the fourth partition for the extended partition extended, and in the extended partition within a plurality of logical partitions. The extended partition is just a shell that does not support formatting and is really storing logical partitions. [[emailprotected] ~]# fdisk/dev/sdbwelcome to
(Mount)#mkdir /mnt/vcdromNote: Create a directory to use as a mount point#mount -o loop -t iso9660 /home/sunky/mydisk.iso /mnt/vcdromNote: With/mnt/vcdrom, you can access all the files in the disc image file Mydisk.iso.Hooking up a removable hard diskFor Linux systems, the USB interface's removable hard disk is treated as a SCSI device. Before inserting a removable hard disk, you should first use fdisk –l
redhat6.2 on the LVM.
1
First, add a hard drive to RH on the virtual machine.
2
Start RH
3
Enter on the terminal
[beigang@localhost~] $fdisk-L
disk/dev/sdc:1073 MB, 1073741824 bytes
......
DISK/DEV/SDC doesn ' t contain a valid partition table
4
Partition 1
[beigang@localhost~] $fdisk/DEV/SDC
Command (M for help): N
Command Action
E Extended
P primary partition (1-4)
P
Partition number (1-4): 1
The cylinder
Linux is a multi-userTick Operations for tasksSystem, all one to use system resourcesof usersThe system administrator must firstApply for an account, and then enter the system as the account ID. The user's account can help the system administrator to use the systemof usersTo track and control their access to system resources, and to help users organizeFiles, and provides security protection for users. Each user account has a uniqueof usersName and use
Linux is a multi-user multi-tasking time-sharing operating system, all of which use system resourcesof usersMust first request an account from the system administrator, and then enter the system as the ID of the account. The user's account can help the system administrator to use the systemof usersTo track and control their access to system resources, on the other hand, to help users organize files and provide security protection for users. Each user
physical memory shortages to some extent. If the current Linux host runs more services and needs more swap space to support the application, you can add a new swap partition for it. Using the mkswap Command tool, you can create a swap file system on the specified partition, and the target partition should first set the ID to 82 through the Fdisk tool. : 650) this.width=650; "Style=" background-image:none;
/i18n setting file
Lang = en english font
Sync writes data synchronously to the hard disk
Shutdonw-H now Half poweroff Shutdown
Reboot restart
Startx init5
/Work ? Work: Search for document content up and down
Chgrp changed the archive group chgrp testinginstall. Log
Chown changed its owner chown root: rootinstall. Log
Chmod change attribute chmod 777install. Log READ = 4 Write = 2 execute = 1
CP copy CP filename
Rm delete file Rm-RF filename force delete file
Rmdir Delete folder
MV mobile mv
and only mount the root directory, that directory will be able to have the root home directory, so we would like Root home directory and root directory to be placed in the same partition.
/sbin
Linux has a lot of instructions to set up the system environment, these instructions only root can be used to set up the system, the other users can only be used to query. Placed under the/sbin for the boot process required, which includes t
On a Linux server, when the partition planning of an existing hard disk does not meet the requirements (eg: too little space left on the root partition to continue installing a new System program), the partitions on the hard disk need to be redesigned and adjusted, and sometimes new hard disk devices need to be added to extend the storage space.
To do this requires an FDISK disk and partition management to
file system is based on a storage device, such as a hard disk or a CD, and maintains the physical location of the file. It can also be said that the file system is also a method for storing virtual data or network data, such as NFS;En.wikipedia.org/wiki/Filesystem
2. Understand the keywords of the file system;
0) storage medium:
Hard Disk, CD, floppy disk, Flash disk, tape, network storage device, etc;
1) disk segmentation:
This is for large-capacity storage devices, mainly refers to hard disks
OriginalLinux is a multi-userTick Operations for tasksSystem, all one to use system resourcesof usersThe system administrator must firstApply for an account, and then enter the system as the account ID. The user's account can help the system administrator to use the systemof usersTo track and control their access to system resources, and to help users organizeFiles, and provides security protection for users. Each user account has a uniqueof usersName and user password. Users type the correct lo
I. df commandDF comes from the coreutils software package and comes with it during system installation. We can use this command to view the disk usage and the location where the file system is mounted. For example:
[Root @ localhost beinan] # DF-lHFilesystem capacity in use available % mount point/Dev/hda8 11g 6.0g 4.4g 58%//Dev/SHM 236 M 0 236 m 0%/dev/SHM/Dev/sda1 56G 22g 35g 39%/mnt/sda1We can see that the system is installed in/dev/hda8; there is also a 56 GB disk partition/dev/sda1 mounted
only be selected for consent. Unless you do not want to install it, click "Next", as shown in figure 3.Select the installation type. Generally, select "typical installation". Here is another option: "Recover System Boot", which will be used in future systems, the system uses it for recovery when a problem occurs. click Next, as shown in figure 4.Configuring partitions is a key step. If you do not do this, you will lose the useful data on the hard disk. Please be careful. The main reason why som
useful data, so be careful that some people who use Windows for a long time cannot install Linux because of this step. If you select "Use the FDISK program to manually partition (expert only)", click "Next" will show the following figure 5
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>
Use this met
the command below.#cp/dev/cdrom/home/sunky/mydisk.iso or#dd If=/dev/cdrom Of=/home/sunky/mydisk.isoNote: Any of the above commands can be used to make discs in the current optical drive into a disc image file/home/sunky/mydisk.iso2. Make the files and directories into a disc image file, execute the following command.#mkisofs-R-j-v Mydisk-o/home/sunky/mydisk.iso/home/sunky/mydirNote: This command makes all directories and files in the/home/sunky/mydir directory into a disc image file/home/sunky/
I believe many new users who want to learn linux are wondering what linux learning courses are good. The following small series will collect and organize several important tutorials for you to learn, if you want to learn more, go to the wdlinux school to find more tutorials.LinuxMount NTFSPartitioning and attaching MethodsIf your disk is in NTFS format, follow these steps to skip the next step.First downloa
In the process of using Linux, it is sometimes due to improper partition caused by the installation of the system due to the lack of partition space, and some areas of excess space. For example: I installed the system to the/usr/local distributor 5G space, but after using a process found that/usr/ Local only uses up to 1G. This can adjust the/usr/local size to 1G. Leave 4G for his use. This paper summarizes the method of adjusting file system size wit
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.