Author: CaoHu
E-Mail: hnu_xiaohu@163.com Version:0.1 Date: 2017-01-29 10:28
Description: My level is limited, if there are some weaknesses, welcome criticism. If the content of the blog is involved in infringement, please contact my mailbox, it will be deleted immediately, welcome to exchange, learn from each other!
“CTRL+Alt”切出光标;
一、Linux文件基本操作指令
su+ 空格+‘-’+用户名...............................................切换用户命令;
‘adduser’+用户名..........................................................添加用户命令;
passwd+用户名........................................................给用户添加密码;
“tab”键........................................................................实现自动补全;
“#”管理员提示符;“~”当前用户工作目录;“$”普通用户提示符;
ls......................................................................查看文件夹下有哪些文件;
ls+空格+“-”+l..................................................查看当前目录的详细信息(如文档大小,创建时间等);
linux存在“一点哲学”:一切皆为文件。
1.普通文件(以“-”开头)
2.目录文件(以“d”开头)
3.设备文件(以“c or b”开头)
4.链接文件(以‘l’开头)
特殊的有:
以“p”开头...............管道文件;
以‘s’开头................共享文件;
r-----可读、w-------可写、x------可执行
chmod-------改变权限;
chmod u+x-------给当前用户加可执行权限;
u-----当前用户,g------同组用户,o-----其他用户,a-----所有用户。
clear-----清除命令;
二、对文件一些基本操作命令
man + ls-------列出‘ls’的手册;
touch+文件-------创建文件(如touch hello.C)
gedit--------编辑文本(如gedit hello.C)
cat------查看文件(如cat hello.C)
gcc------编译(如gcc hello.C)
./执行(如./ a.out)特别注意:中间无空格
rm 删除文件 (如删除rm demo.c)
rm -f 强制删除