当前位置:网站首页>Rocky基础命令3
Rocky基础命令3
2022-07-05 12:45:00 【51CTO】
1、命令名称:ln
命令所在路径:/usr/bin/ln
执行权限:所有用户
语法:ln [-s] 源文件 链接
-s 建立软链接(类似windows里的快捷方式)
功能描述:建立链接文件(默认不加-s创建硬链接)
举例:
[[email protected] <sub>] #ln anaconda-ks.cfg a #创建硬链接,链接数会增加1
[[email protected] </sub>] #ll
total 12
-rw -- -- -- -. 2 root root 1438 Jul 2 10:43 a
-rw -- -- -- -. 2 root root 1438 Jul 2 10:43 anaconda-ks.cfg
-rw -r --r --. 1 root root 1728 Jul 2 10:52 initial-setup-ks.cfg
[[email protected] <sub>] #ln -s anaconda-ks.cfg b #创建软链接
[[email protected] </sub>] #ll
total 12
-rw -- -- -- -. 2 root root 1438 Jul 2 10:43 a
-rw -- -- -- -. 2 root root 1438 Jul 2 10:43 anaconda-ks.cfg
lrwxrwxrwx. 1 root root 15 Jul 4 20:54 b -> anaconda-ks.cfg
-rw -r --r --. 1 root root 1728 Jul 2 10:52 initial-setup-ks.cfg
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
2、命令名称:tr
命令所在路径:/usr/bin/tr
执行权限:所有用户
语法: tr [-sdct] 第一个字符集 [第二个字符集]
-s 去重
-d 删除匹配 ”第一个字符集“ 的字符
-c 除去包含 ” 第一个字符集 “ 外的字符都将由 “ 第二个字符集” 的最后一个字符替换
-t 将 “第一个字符集 ” 替换为 “ 第二个字符集” ,位数按第一个字符集确定
功能描述:转换和删除字符
举例:
[[email protected] <sub>] #tr a-z A-Z
abcdefg
ABCDEFG
[[email protected] </sub>] #df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 885060 0 885060 0% /dev
tmpfs 914116 0 914116 0% /dev/shm
tmpfs 914116 9300 904816 2% /run
tmpfs 914116 0 914116 0% /sys/fs/cgroup
/dev/sda2 31441920 5629848 25812072 18% /
/dev/sda1 506528 244712 261816 49% /boot
tmpfs 182820 0 182820 0% /run/user/0
[[email protected] <sub>] #df | tr -s ' ' %
Filesystem%1K-blocks%Used%Available%Use%Mounted%on
devtmpfs%885060%0%885060%0%/dev
tmpfs%914116%0%914116%0%/dev/shm
tmpfs%914116%9300%904816%2%/run
tmpfs%914116%0%914116%0%/sys/fs/cgroup
/dev/sda2%31441920%5629848%25812072%18%/
/dev/sda1%506528%244712%261816%49%/boot
tmpfs%182820%0%182820%0%/run/user/0
[[email protected] </sub>] #tr -d abc < /etc/fstab
#
# /et/fst
...
[[email protected] <sub>] #tr -t etc ETC < /etc/fstab
#
# /ETC/fsTab
# CrEaTEd by anaConda on SaT Jul 2 02:32:29 2022
...
[[email protected] </sub>] #tr -c wangdayu a
abcdefg
aaadaaga
[[email protected] <sub>] #tr -c wangdayu 0
wangxiaochun
wang00a000un0
[[email protected] </sub>] #tr -c wangdayu 011
wangxiaochun
wang11a111un1
[[email protected] ~] #tr -c wangdayu 011
wangxiaochun
wang11a111un1
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
边栏推荐
- Default parameters of function & multiple methods of function parameters
- A small talk caused by the increase of sweeping
- Overflow toolbar control in SAP ui5 view
- Discussion on error messages and API versions of SAP ui5 getsaplogonlanguage is not a function
- RHCSA1
- #yyds干货盘点#js截取文件后缀名
- Alibaba cloud SLB load balancing product basic concept and purchase process
- How to connect the API interface of Taobao open platform (super detailed)
- Detailed explanation of navigation component of openharmony application development
- 946. 验证栈序列
猜你喜欢
《2022年中國銀行業RPA供應商實力矩陣分析》研究報告正式啟動
[cloud native] use of Nacos taskmanager task management
SAP SEGW 事物码里的 Association 建模方式
关于 SAP UI5 floating footer 显示与否的单步调试以及使用 SAP UI5 的收益
SAP SEGW 事物码里的 ABAP 类型和 EDM 类型映射的一个具体例子
Hiengine: comparable to the local cloud native memory database engine
Kotlin variable
Laravel document reading notes -mews/captcha use (verification code function)
DNS的原理介绍
使用 jMeter 对 SAP Spartacus 进行并发性能测试
随机推荐
OpenHarmony应用开发之Navigation组件详解
国内市场上的BI软件,到底有啥区别
RHCAS6
我在滴滴做开源
A possible investment strategy and a possible fuzzy fast stock valuation method
RHCSA1
解决 UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa2 in position 107
A small talk caused by the increase of sweeping
Yyds dry inventory JS intercept file suffix
How to connect the API interface of Taobao open platform (super detailed)
Kotlin function
[cloud native] use of Nacos taskmanager task management
Actual combat simulation │ JWT login authentication
Taobao flag insertion remarks | logistics delivery interface
谈谈我写作生涯的画图技巧
Natural language processing series (I) introduction overview
It's too convenient. You can complete the code release and approval by nailing it!
Simply take stock reading notes (2/8)
CF:A. The Third Three Number Problem【关于我是位运算垃圾这个事情】
Yyds dry goods inventory # solve the real problem of famous enterprises: move the round table