The Linux Command Line

用鼠标的中键可以直接粘贴已选中的内容

Simple Command

date 查看当前日期

cal 查看日历

df 看磁盘的空间

free 展示空闲内存的容量

exit or ctrl+D 退出终端

Navigation

pwd 输出现在工作空间的目录

cd 改变目录

ls 查看当前目录内容

. 代表当前目录

代表当前目录的父目录

**cd 空格 ** 回到工作主目录

cd - 回到上一级目录

cd username 回到username的工作主目录

Exploring the System

file 决定文件类型

less 查看文件内容

ls命令

ls + 指定path 展示指定path下的文件

ls -l 改变了展示文件的格式

ls -a 展示所有文件(包括隐藏文件)

ls -A 和ls -a类似但是不展示.和…

ls -d 展示文件夹

ls -F 如果是文件夹后面会有/

ls -h 以人类易读的形式展示

ls -r 以反序显示结果

ls -s 以文件大小排序

ls -t 以修改时间排序

file 命令

file filename 查看文件的信息

less -Option

/bin 包含了系统必要的运行文件

/boot 包括了Linux内核,初始化RAM的磁盘图像和boot 装载器

/dev This is a special directory that contains device nodes.

/etc contains all of the system-wide configuration.
The Linux Command Line笔记
The Linux Command Line笔记
The Linux Command Line笔记
The Linux Command Line笔记

Manipulating Files and Directories

**cp ** 复制文件和目录

mv 移动或重命名文件和目录

mkdir 创造目录

rm 删除文件或者目录

ln 创造symbolic links

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-3IzU3eCz-1594885440839)(F:\pictures\TIM图片20200715194213.png)]

cp Copy Files and Directories

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-pRF1ThQO-1594885440839)(F:\pictures\TIM图片20200715195047.png)]

mv

mv item1 item2: the same as cp

mv item… directory to move one items from directory to another

ln – Create Links

**ln file link **创造一个链接

**ln -s item link **无论item是文件夹还是文件,创造一个链接

Hard Link 只能指定文件

**Symbolic Links:**可以指定文件夹

**ln file link **创造一个链接

**ln -s item link **无论item是文件夹还是文件,创造一个链接

Hard Link 只能指定文件

**Symbolic Links:**可以指定文件夹

相关文章:

  • 2021-11-03
  • 2020-07-18
  • 2021-09-17
  • 2021-09-17
  • 2021-11-03
  • 2021-09-10
  • 2018-02-06
  • 2021-11-21
猜你喜欢
  • 2021-08-26
  • 2019-03-23
  • 2021-09-17
  • 2021-09-17
  • 2021-09-17
  • 2021-12-28
  • 2021-09-07
相关资源
相似解决方案