Happy Linux command line

Source: Internet
Author: User

LS-List Directory contents

-A list of all files -d Specifies directory information -F for directory additions/ identifiers -H Enhanced readability -L column mode display -R reverse order display -S Sort by size -T by modified time

File-Determine the type of files

Less-Browse file contents

Manipulating Files and directories

CP Copy files/directories

-a copy of files, directories, and their properties -I need to prompt if overwrite occurs -R recursively copies the contents of the file, which is used when copying the directory -youonly copy files that do not exist in the target directory -V display of detailed command operation information

MV Move/rename files/directories

-I prompt user before overwriting an already existing file -u move only nonexistent file, or file content new file -V display detailed operation information

mkdir Creating a Directory

RM Delete files/directories

-I delete before prompt -r Recursive delete file, generally delete directory when used -f Ignore nonexistent file -V display detailed operation information

Note: Execute the LS before executing RM and see which files are deleted

LN creates a hard link or symbolic link

Symbolic Link:lnfile link hard link:ln -S item link, item can be a file or a directory

Hard Links:

By default, each file has a hard link.

A hard link cannot associate a file other than the file system in which it resides.

Hard links cannot be associated with a directory

Symbolic Links:

Equivalent to a shortcut in Windows

Type description Command types

The four-form of the command: an alias for the executable inside the shell's own command shell function command [email protected]-rev-1-0: ~$ TypelslsIs 'ls--color=auto'the alias[Email protected]1-0:~$ type showrtshowrt is 'SH/home/sherry/workplace/usefull/SH/showtime.SH'the alias[Email protected]1-0:~$ type CDCD is shell built-in [email protected]-rev-1-0: ~$ type Start-all.SHStart-all.SHIt's/opt/hadoop-.1.2.1/bin/start-all.SH

Which shows the program executed by the command

[Email protected] 1-0whichman/usr/bin/Mans

Man Query Command manual

Apropops displays a series of appropriate commands

Info Display command Information

Whatis A concise description of the display command

Alias create command Alias

Happy Linux command line

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.