Basic commands for Linux

Source: Internet
Author: User

| Pipe symbol

mkdir Creating a Directory

Touch to create a file

Mkdir-p is a recursive parameter such as: mkdir home/1/2/3/4/ -P continuous creation of multi-level directory when you need to add P

RmDir is to delete the empty directory

RM is a file that is deleted

RM-RF back with file does not prompt delete force delete all files

cd-returns the last path that was located

CD/Direct back to root directory

LS access full path ls directly to file also line

MV Move [[Email protected] ~]# mv test/tmp move equals delete move to another folder.

MV can rename direct MV

[[email protected] tmp]# ls

1 ABC home ifcfg-1677736 ifcfg-eno167771 ifcfg-eno16777736 Ifcfg-lo test

[[Email protected] tmp]# MV 1 333

[[email protected] tmp]# ls

333 ABC home ifcfg-1677736 ifcfg-eno167771 ifcfg-eno16777736 Ifcfg-lo test


CP is a copy of copies to do backup

MV Direct change is the file name content invariant copy is the name unchanged content changed reference Windows copy and paste

CP command copy files do not need to copy directories need to add-r


Cat viewing the contents of a file (content with cat view)

    1. Cat-n is the most common one-line look

More also view the contents of the file (more than one page to see the content)


Head look at the file header 10 lines

1.head Plus-numbers such as Head-1


Tail look at the end of the file 10 lines

TAIL-1 Plus number is a few lines to see from the end of the file

TAIL-FN 10 look at the system last 10 lines of file


Echo is the output

echo a greater than sign is overwrite

Two greater than sign is added in



































(nosuch file or directory is not available)

Basic commands for Linux

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.