美文网首页
Linux基本指令

Linux基本指令

作者: sixfold_yuan | 来源:发表于2017-11-13 18:49 被阅读0次

clear 清空屏幕

cd

cd foldername/ 移动到相应目录
cd .. 返回上级目录
cd ../.. 返回上上级目录
cd - 返回上条指令目录
cd ~ 返回/home/username目录
cd /home/username/Documents/ 绝对路径

ls

ls 浏览文件夹下的文件(白色)和文件夹(蓝色)
ls -l 显示全部信息
ls -a 显示全部文件(包含隐藏文件)
ls -lh 显示全部信息,友好显示

touch

touch filename 创建文件
touch filename1 filename2 同时创建多个文件

cp

cp file1 file1copy 复制文件
cp -i file1 file1copy 交互复制,防止重复写入
cp file1 foldername/ 复制到文件夹下
cp -R folder1/ folder2/ 递归复制,folder1下的文件复制到folder2文件夹下面
cp file* 复制file开头的文件
cp *name 复制name结尾的文件

mv

mv file1 folder1/ 移动到文件夹下
mv file1 filerename 重命名文件

mkdir

mkdir folder 创建文件夹

rmdir

rmdir folder 移除空文件夹

rm

rm file1 移除文件
rm -i file1 交互删除
rm -I f1 f2 f3 超过三个以上文件提醒
rm -r folder 删除有文件的文件夹

nano

touch test.py
nano test.py 编辑test.py
输入print("python script")
ctrl+x退出,y确定保存
python3 test.py运行test.py

cat

cat test.py 显示文件内容
cat test.py > test1.py 复制内容到test1.py
cat test.py test1.py > test2.py 合并复制内容到test2.py
cat test.py >> test2.py 把test内容加到test2中

相关文章

  • Linux高级命令详解【乐搏TestPRO】

    前面讲过了Linux基本指令的使用,请参考Linux基本指令详解,接下来我们来学习下Linux的高级指令之文本处理...

  • Linux —— Day1(Linux系统文件和基础指令)

    一、Linux系统的目录结构 二、Linux基本指令 1、指令与选项 2、基础指令 (1)ls指令 (2)pwd ...

  • Linux 基本指令

    查看进程: 1、ps 命令用于查看当前正在运行的进程。grep 是搜索例如: ps -ef | grep java...

  • Linux基本指令

    clear 清空屏幕 cd cd foldername/ 移动到相应目录cd .. 返回上级目录cd ../.. ...

  • linux基本指令

    系统信息arch 显示机器的处理器架构(1)uname -m 显示机器的处理器架构(2)uname -r 显示正在...

  • Linux基本指令

    指令作用more /etc/issue返回当前使用的Linux版本ps -p $$返回当前使用的shellwhoa...

  • Linux的基本指令

    Linux的基本指令 一、进阶指令(重点) 1、cat 选项: -b, --number-nonblank 对非空...

  • Linux的基本指令

    Linux的基本指令 一、进阶指令(重点) 1、cat 选项: -b, --number-nonblank 对非空...

  • linux基本操作指令

  • Linux screen 基本指令

    创建新的虚拟终端 screen -S name 离开虚拟终端(不关闭) ctrl + a 然后 d 查看所有正在运...

网友评论

      本文标题:Linux基本指令

      本文链接:https://www.haomeiwen.com/subject/lizzmxtx.html