Common basic commands clear interface cd enter directory ls list file and directory ll list file and directory ls-d view directory properties tree display file and directory structure pwd print current directory mkdir create directory rm remove file rm-rf remove File (no prompt) cp...
Common basic commands clear interface cd enter directory ls list file and directory ll list file and directory ls-d view directory properties tree display file and directory structure pwd print current directory mkdir create directory rm remove file rm-rf remove File (no prompt) cp copy www.2cto.com cp-r copy (recursive) mv mobile files and directories cat show text content cat-n show text content (show row number) more paging display text files less paging display text files (can be rolled back) tail: The Last 10 rows of the file. tail-5: The Last 5 rows of the file. head: 5: The first 10 rows of the file. head: 5: The first 5 rows of the file.
Mount-t iso9660/dev/cdrom/mnt/cdrom load drive umount/dev/cdrom uninstall drive mount/dev/fd0/mnt/floppy load drive mount-t iso9660-o loop xxx. iso/mnt/cdrom load the iso file cp/dev/cdrom xx. iso production iso file ailas system command date ing date display current date and time date 10310101 modification time MMDDhhmmcal display calendar cal-y display calendar of one year cal-3 display calendar of three months cal 07 1999 displays the calendar of the specified month www.2cto.com user management useradduser-D to modify the default configuration added by the user, that is, File/etc/defautl/useraddadduser (easy to use, interactive) modify user configuration file add new user page-North South-/05/11--4 comment 1) modify/etc/passwd, add user records, run the command pwconv to synchronize the shandow File 2) modify/etc/group, add user group information, and run the command maid to synchronize the gshandow file 3) create the user's home directory, copy the user startup file (/etc/skel/) to the directory; 4) modify the owner and permissions of the home directory; (chown, chmod, chgrp) 5) set new user password (passwd) passwd change user password chfn use interactive mode modify user details groupadd add user group gpasswd modify user group password userdel-r delete user and delete user directory groupdel delete user group
User query id display current user id information id user display user id information finger query user details w query login user information who query login user information users query login user information groups query user group Information File Management 1. linux File attributes when we use the ls-lih command 2408949-rwxr-xr-x 1 root 7 04-21 lsfile. sh explanation: www.2cto.com first field: inode second field: file type and permission; third field: number of hard links; fourth field: Owner; fifth Field: group to which the file belongs; sixth field: file or directory size; field 7 and field 8: Last access or modification time; field 9: file name or directory name
2. inodeinode is an index node. Partition of each storage device or storage device (the storage device is a hard disk, floppy disk, USB flash disk ......) after being formatted as a file system, there should be two parts: one part is inode, the other part is Block, and the Block is used to store data. Inode is used to store the data information, including the file size, owner, owner user group, and read/write permissions. Inode indexes information for each file, so there is an inode value. Based on commands, the operating system can find the corresponding files with the fastest inode value. (1) in a Linux file system, files with the same inode value are hard-linked files. that is to say, inode may be the same for different file names. one inode value can correspond to multiple files. It is not difficult to understand the link file. just look at the example. In Linux, the link file is created using the ln tool. Note: hard links cannot be created for directories. only files can be created for hard links. (2) a soft link is also called a symbolic link. it is different from a hard link. a soft link file is only a mark of its source file. After the source file is deleted, the linked file cannot exist independently. although the file name is retained, we cannot view the content of the soft link file. A soft-link file is actually a mark of the source file. when the source file is lost, it exists. Soft-link files only occupy inode to store soft-link file attributes and other information, but file storage points to the source file. Different from hard connections, www.2cto.com is applicable to files and directories.
3. file permissions each file or directory has a set of 9 permission bits, each of which is divided into one group, they are a sovereign limit (three locations) user group permissions (three locations) and other user permissions (three locations ). For example, in rwxr-xr-x, we can check whether there are nine locations. these nine permission locations control the permissions of the file owner, user groups, and other users. Command to modify permissions: chmod, chmod-R (rwx 421) 4. chown, chown-Rchgrp, chgrp-R disk management df-lhdu-h process management ps auxps aux | grep firefoxpgrep firefoxkill-9 process no. killall name xkill graphical tool top dynamic monitor process interaction command: P, the Minux system boot management GRUB (GRand uniied Bootloader) system boot guide manager is the first program to run after the computer is started. it is used to load and transmit control to the operating system kernel, once the kernel is mounted, the task of the system boot manager exits, and other components of the system boot, such as the system initialization and startup process, are completely controlled by the kernel; file www.2cto.com fortunefindgrepgzipgunzippsps-ef | grep xxxkillkill-9 by JustRun
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