How to Create file commands in Linux

Source: Internet
Author: User
Using Mkdir/home/u1 to create a folder home/u1Chownoracle/home/u1 indicates changing the directory owner

 

Create a file

Mkdir aaa

Mkdir-p aaa

Create a folder

Vi foo.txt

Emacs foo.txt

Echo "aaa"> foo.txt

Cat> foo.txt

Clear command

> Foo.txt

Mkdir/home/u1 create folder home/u1

Chown oracle/home/u1 indicates changing the directory owner to an orade account

Chgrp dba/home/u1 change/home/u1 directory to all dba

Chomd 755/home/u1 indicates that the oracle account has 755 permissions on the/home/u1 directory.

Rmdir/home/u1 indicates that the/home/u1 empty directory is deleted.

Hostname allows you to view the linux computer name

Whoami allows you to view the current user

Pwd displays the current path

Df View system hardware information

Ls-lrt l indicates that the detailed list is displayed,-t indicates that the list is sorted by time, and-r indicates reverse sorting.

Catorcl_ora_3436.trclgrep buchket

See the following file content

More/etc/oratab

Cat/etc/passwd

Cat/et/group

The above is how to create a file command in linux

Vi has three operation statuses: command mode, insert mode, and last line node)

The Commond mode controls the movement of the screen cursor, the deletion of characters or the cursor, and the movement copies the home of a certain area, enters the insert mode or to the last line mode.

 

From xweina's column

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.