Linux common commands (i)

Source: Internet
Author: User

Format of command: command-option parameter

Example: LS-LA/ETC option can be used in conjunction with .Represents the current directory ..Represents the parent directory of the current directory root user common command address root:/sbin/usr/sbin All users common command address all users:/bin/usr/binbin-->binary Usr-->user sbin-->      Super binary Ls-l View file details: drwxrwxr-x.       2 Hadoop hadoop 4096 Oct 16:15 wordinput permissions Hard Link number owner Owning group file size file created or last modified time file/directory name file common type:d--> directory, directory--to-file, and soft connect file, link permissions: R-->re AD, read W-->write, write x-->execute, execute rwx r-x r-x owner belongs to group other people User: U-to owner, user, Onwerg-to Group, Groupo--Other people, others File processing Commands
Command: LS (list) display directory file option-A (all) displays all files, including hidden files-L (long) details Display-D (driectory) View directory information-I (Inode) I node, file Digital Signage CD (Change direct Ory) switch directory pwd (print working directory) display current working directory mkdir (make directories) Create new directory touch Create a new file CP (copy) copy file or directory option-r copy directory MV shift Move file, rename rm (remove) Delete File option:-R Delete directory-F Force delete cat (concatenate and display files) view file contents More paging View file content syntax: (space) or F display next (Enter) display Next line Q or Q exit Head view the first few lines of the file syntax: head-num "file name"-num displays the number of lines in the file tail the last few lines of the file syntax: tail-num "file name" shows the file after a few lines tail-f "file name" dynamically displays the contents of the file ln ( link) generates connection file syntax: ln-s "source file" "Target file" #产生软连接, similar to the shortcut connection in window ln "source file" "Target file" #产生硬连接, copy + synchronous update, with the same I node file, non-Kua file system generation Rights Management Commandschmod (Change the permission mode of a file) changing the permissions syntax for files or directories: chmod [{ugo} {+-=} {rwx}] [file or directory] [mode=421][file or directory]chm od U + R g-w o = XR--4 w--2 x--1rwx r-x r--7 5 4 Deep understanding of permissions file R---> Cat, MO Re, head, Tailw-->echo, vix--> command, script directory R-->lsw-->touch, mkdir, RMX-->CD chown (change file Ownership) Change the owner syntax of a file or directory: Chown "owner" "File or directory" Add user useradd "user name" passwd "password" chgrp change the owning group of the file or directory, similar chown display to Umask, Set default permissions for files 00220--special permission bit 022--user rights bit, permission mask value. The file created by default for 777-022=755umask-slinux permission rules cannot be granted executable x permissions.

Linux common commands (i)

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.