How to create a file command in the Linux operating system

  

Create a file

mkdir aaa

mkdir –p aaa

Create a folder command

Vi Foo.txt

emacs foo.txt

echo “aaa”>foo.txt

cat >foo.txt

Clear Command< Br>

>foo.txt

Mkdir/home/u1 Create folder home/u1

Chown oracle/home/u1 means change directory owner to orade account

Chgrp dba /home/u1 changes the /home/u1 directory to dba all

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

Rmdir /Home/u1 means delete /home/u1 empty directory

Hostname can view linux computer name

Whoami can view current user

Pwd displays current path

Df View system hardware information

Ls –lrt l means to display a detailed list, -t means sort by time, -r reverse sort

Catorcl_ora_3436.trclgrep buchket

See the related file contents below

More/etc/oratab

Cat /etc/passwd

Cat/et/group

The above is the linux create file command Method

Vi is divided into three operational states: command mode, insert mode, and last line node.

Commond mode control screen The movement of the cursor, the deletion of characters or cursors, the copying of a certain area, entering the insert mode or to the last line mode

Copyright © Windows knowledge All Rights Reserved