Some Common commands in Ubuntu

Source: Internet
Author: User
1 file management # lsls-a lists all files in the current directory, including. header hidden file management # lsls-l or ll list detailed file information under the current directory file management # pwdpwd view the absolute path of the current directory by file management # cdcd .. back to the upper-level directory file management of the current directory # cdcd-back to the last directory file management # cdcd ~ Or cd back to the current user's home directory file management

1. File Management # ls-a lists all files in the current directory, including hidden files with a. header.

File Management # ls-l or ll lists the details of files in the current directory

File Management # pwd view the absolute path of the current directory

File Management # cd .. back to the upper-level directory of the current directory

File Management # cd-back to the last directory

File Management # cd ~ Or cd back to the current user's home directory

File Management # cd ~ The user name is returned to the specified user's home directory.

2. File Management # create a directory with the mkdir directory name

File Management # mkdir-p recursively create some nested Directories

File Management # rmdir Rmdir empty directory name to delete an empty directory

3. File Management # delete one or more files by rm file name

File Management # rm-rf non-empty directory name recursively deletes everything in a non-empty directory, without the mention of-f

4. File Management # view the file content on a single screen with cat file names

5. File Management # View File Content by page for more file names

6. File Management # The file content can be viewed on Controllable pages with less-than file names

7 file management # grep character file names view part of the file content based on character matching

8. File Management # Move the files under the music/video path/file path to the absolute path

File Management # change the name of the mv file in the current directory

9 file management # cp/path/file./move files under absolute path to the current directory

10 file management # find path-name "string" to find the files and directories that match the string in the path

11 file management # ln Source File Link name creates a hard link to the source file of the current directory

Ln/home/test/usr/test1 create a hard link for/home/test under/usr

12 file management # ln Ln-s a B create the symbolic link B of a in the current directory

13 file management # touch file1 file2 create two empty files

14 disk management # df is used to report the total capacity, usage, and remaining capacity of the file system.

15 disk management # du-B/home view the current/HOME directory capacity (k) and sub-directory capacity (k ).

16 disk management # fdisk-l view system partition information

17 disk management # fdisk/dev/sdb is used to partition a new SCSI hard disk.

18 disk management # mkfs. ext3 Mkfs. ext3/dev/sdb1

Format the first primary partition of the first SCSI hard disk

Ext3 File System

Mkfs. ext2 Mkfs. ext2/dev/sdb2 format to ext2 File System

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.