欢迎光临散文网 会员登陆 & 注册

Linux学习

2023-07-16 22:38 作者:蛋蛋挞糊了  | 我要投稿

最近在学习系统,打算写专栏分享笔记增强记忆,大家一起学习😁

2023/7/16

1.ls

1.1 ls -l

1.2 ls -a

2.cd

2.1 cd ../

2.2 cd /

3.tree

4.gcc instruction

    4.1 gcc 1.c -o 1

    4.2 gcc 1.c -o 1 -lm

    4.3 gcc -g 1.c -o 1

    4.4 gcc -E 1.c -o 1.i

    4.5 gcc -S 1.i -o 1.s

    4.6 gcc -c 1.s -o 1.o

    4.6 gcc 1.o -o 1.c

    4.7(Create dynamic library)gcc -shared 2.c -o 2.so

    4.8(Useing dynamic library )gcc main.c ./2.so -o main

    4.9(Create static library )ar rcs lib2.a 2.o

    4.10(Useing static library)gcc main.c -o main -L. -l2 

    4.11 (turn of worning)gcc -w 1.c -o 1

5.Change Power :chmod

    5.1chmod 777 1.c

6.remove

    6.1delete file: rm  (file name)

    6.2Delete folder and file: rm  -rf  (folder)

7.Use of vim:

    7.1 vim (file name)

    7.2(insert mode ) press down i;

    7.3 (‘shift’+’:’)Bottom line mode

    7.4 ‘wq!’Save +Quit +Ensforce

8.Find

    8.1 find  [path]  [expression]

    8.2 Find files with suffix “.c”of current directory and subdirectory: find -name “*.c”

9.User

    9.1  Create user: sudo  adduser  [name]

10.Create directory: mkdir [-p] [name]; 

     Delete directory: rmdie [-p] [name];

11.View current path:pwd

12.Display tree directory:tree [name]

13.Download: apt-get install [name]

14.Copy: cp  [file name]  [path]

15.Mv

15.1Move file: mv [file name and suffix]

15.2Change File Name: mv [old file name]  [new file name]

16.Compression

16.1Compress file: tar -czvf [file name]

16.2Decompress file: tar -xzvf [file name]


Linux学习的评论 (共 条)

分享到微博请遵守国家法律