栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Linux simple cmd

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Linux simple cmd

mkdir -p da/db/dc

mkdir directory

rm -rf

rmdir directory

command;command2;command3

command1;sleep 10;command3

echo "command1;sleep 10;command3" >>main.c

cp -r da dc:r -recursive

-i:indication

rm -rf :remove -recursive -force

rmdir : remove directory

rm : remove file

rm -f !(main.c):except main.c

find . -not -name "mian.c" -exec rm -rf {} ;

ls -F:-

format

echo *.c

ls *.c

rm *.c

?:one character

*:any character

ls f?

ls f[a-c]

ls f[123abcd]

echo f[4-12]:f[4-1] or f[2]

cat file:

more file:(q:quit)

less file:

head -5 file:show the first 5 lines

tail -3 file:show the last 3 lines

wc file:word count

wc -l file:line count

grep keywords file:search keywords

grep -i keywords file:ignore uppercase or lowcase

grep -v keywords file:search without keywords

cmd 1|cmd 2:cmd1's result is the parameter of cmd 2

eg:grep main|more


 

vim

H:first line

L:last line

M:middle line

ctrl+f:forword

ctrl+b:backspace

:number :locate no. line

number G:no. line go

G:go to end of file

G1:the first line of the file

w:next word

b:previous word

e:word end

set nu //show the line number

set nonu:

I:input at the start of line(Insert)

A:intput ar the end of line(Append)

O:insert a line up;(ON)

x:delete character

5x:delete 5 character

u:undo

p:ctrl+z

P:paste

dw:delete word

de:delete to end word

dd:delete line

d$:from curser to the start of line

8,11 m 18 line:move

8,11 co 18 line:copy

yl:copy

yw:copy word

yy:copy the whole line

3yy:3 lines

r key:replace

cw:

~:change uppercase and lowercase

J:conjuction

/key :search forward key

n:next

?key:search previous

$:sign of the last

%:the whole paper

x:save and exit

telnet

find directory condition [cmd] -- print

eg:

find . -name "f*"

find . -name "*.cpp"

find dir1 condition -exec cp {} target dir2 ;

{} :the file that find

; escape sequence :the sign of cmd over;

eg:

find /home/user/project -name "*.c" -exec cp {} /home/user ;

who:show anybody who on this machine

users:

whoami:

w:who where when do what

history:show history cmd

!number:run the cmd again

du:

Network

ping IP

ifconfi -a


 

FTP

ls:show ftp

!ls :show local

lcd :local change dir

put:upload files

get:download

mput/mget:multiply put/get

mkdir :make dir

bye:exit

help:show all cmds

env:environment

echo "$PATH"

PATH = $PATH:.

:delimiter

whereis cmd :search cmd location

which cmd:

vim my.sh

echo hello world

sleep 10

echo $USER

echo date

source my.sh = ./my.sh


































 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/345653.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号