TLCL
TLCL
Why Linux?
贴个网址 TLCL
alt + left arrow is black to last page return and ctrl + 1 2 3 is switch between different tabs good final got some more ctrl + T new tab and ctrl + n new windows ctrl +shift +n new inrecognized windows AND TYPE THE ALT YOU CAN GO THE UPPERRIGHT CORNER AND USE YOUR UP DOWN RIGHT LEFT KEY TO CHOOSE 右上防三个原点 点一次 alt就够了 another smooth command use the / to goto the search box!!!!!
command
shift+ctrl+6 切出wsl
winter——主机名,SPIKE——用户名
date 时间 calendar 日历
ls ~ ~ symbolized stand for the user directory ls could specify the dr you wanna check.
we could add some format cmd to reveal more details ls -l
the meaning of the long format - indicate the file type and then the next three letters indicates the access rights and then
f11 keystroke could full-screenize the console
file check the brief info of a file
everything is file and mostly the text file only contain ascii code
configuration file or the actually source file most stored in text file format
less less is more and the up down arrow q h n some key cmd you should know
there are some standard pathname in unix-like system just feel free to explore , and dont mind ,we could hardly mess up for the administrator keep everything in order
wildcard just the regular expression also grep
- * mean the any chars ? one single char [set] [!set] [[:key:word]]
mkdir dirc and … eg mkdir dir1 dir2 dir3
cp mv rm like the copy paste and cut delete in windows
- when you want to handle a directory you need to use option -r recrusive
- Be careful with the combo of wildcard and rm so just invoke the ls first to check if the files listed are u really wanna remove no more change to restore the files
- use the . to indicate the workplace
- if you wanna some warning remeber to use op -i
- mv is rename also the same time if the file2 exists then is act like move ifnot then like the rename
the /etc is text configured file and the bin is usually executable and /usr/ is the largest folder in linux
这个ln 指令 ln -s 创建符号连接 有一点像windows的快捷方式 ln创建的是硬的链接 早期 智能文件 不能目录
What is cmd a new set of useful cmds
- 所以命令的本质 有 一个可执行的二进制c函数 2shell python ruby脚本程序 3 shell内置 builtins 4 shell小函数 5 别名
- use the type cmd to check the type of one cmd type [cmd]
- which to check which is the cmd only used for the binary cmd
- help cmd used for the buildins cmd –help the same
- man ls use the manual very simple but difficult to read
- apropos + cmd check the tips 挺有用的 apropos vim
- info 一个更友好的 提示 有超链接
- n 下一个超链接结点 p 上一个 u当前结点菜单 enter进入
- zless 可以查看 .gz文件
- whatis 一个简单的描述
可以一行多个命令 用;隔开
alias 在自己命名之前先使用 type查看一下是否已经是已存在的命令 unalias 取消别名
Evrything is a file
> 重定向 标准输入输出 错误 > 改变标准输出 注意因此 每一次使用时都会使文件重写
> 从头开始 >> append file discripitor 文件描述符 0 1 2 2> 表示方法
新的方法来同时重定向我们的标准输入与输出&> dev/null 一个没用的数据桶 可以用作丢弃一些不用的显示信息
cat 与standard input 有关 cat 单独就是echo ctrl+z强制退出运行 ctrl+d EOF
ctrl+d 是 EOF
| pipeline cmd1|cmd2 将1中的标准输出作为二中的标准输入 cat No?.txt > poem.txt 连续连接文件的例子
***filter 过滤器 ls -l /usr/bin /bin | sort |uniq [-d看见重复内容]| less ***
注意上面几个指令在无参数情况下都是默认接受标准输入 所以 可以使用管道符 很方便 wc 计数
快乐的echo cmd is special when use the echo it will do some process called expansion obviously when you see the echo it just mean use the regular expression
- ***~ echo ~ 显示当前的目录 echo $((expr)) 进行幂展开 ***
- 花括号展开 可以展开字符串表达式
- Parameter expansion 参数展开 very important echo $USER 就像这样 一个查看变量的命令 printenv | less
- command substitution use $(cmd) eg ls -l $(which cp) file $(ls /usr/bin/* | grep zip) 旧标准中有一个
which cp
可以代替 $() - “” sleep 单引号 echo -e $转义字符
- ctrl l ctrl d ctrl t alt u alt l alt t alt f alt b
- tab alt ? alt * ctrl k ctrl y set | less TLDR
.. 代表的是父文件 . 代表当前的工作文件
dr 磁盘空间情况 free 内存空间情况
exit 退出程序
ls most used cmd in shell
$ 用户 # superuser rootuser
file navigation·
. 开头的文件夹 通常是不显示的 隐藏的 注入configuration 类的文件
用 . _ - 代替文件名 中的空格
支持 鼠标中间 paste 双击 copy 或者 选择 copy
其实无论怎样都可以 command –help 查看更多
file
- 查询文件 类型 file + filename
Less
键盘高级操作
- Post title:TLCL
- Post author:Winter
- Create time:2023-05-06 15:02:35
- Post link:https://spikeihg.github.io/2023/05/06/TLCL/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.