The first day of Linux learning

Source: Internet
Author: User

1. User Login Switch

Login with admin

Su or su-

Admin Switch General user (Guowei)

Su-guowei (user name)

2. Directory switching

3. View the directory in which you are located

PWD (Displays the directory in which it resides)

Cd.. /(Go to previous layer) example: CD. /usr cd/usr

CD/(directly into the system root directory)

CD ~ (Switch to user home directory)

LS (shows all current files)

cd– (returns the key and displays the folder)

4. Operation of the catalogue (increase and deletion check)

Create a folder

mkdir test

mkdir test/xxx

View folders

Ls-a View all folders (with hidden)

Ls-l View folder details (abbreviated LL)

Find a Folder

Find/-name ' folder name '

Find/usr–name ' tes* ' Fuzzy Lookup

Modify folder name

MV Oldfilename Newfilesname

You can also rename files and compressed packages

Cut folder

MV Directory name directory new location

Copy (copy) folder (-R recursive copy, which contains the files inside the copy)

Cp–r/2.txt/usr

Delete file (clip)

Rm–r file (folder) (ask whether to delete)

RM–RF file (clip) (delete directly)

The first day of Linux learning

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.