一些有用的bash命令记录汇总
来源:互联网 发布:淘宝店哪家衣服质量好 编辑:程序博客网 时间:2024/05/22 07:03
Renaming/moving files with suffixes quickly:
cp /home/foo/realllylongname.cpp{,-old}
This expands to:
cp /home/foo/realllylongname.cpp /home/foo/realllylongname.cpp-old
Just to point out that to do the reverse (going from .cpp-old to .cpp) you’d do
cp /home/foo/realllylongname.cpp{-old,}
Repeats your last command
!!
Most useful in the form:
sudo !!
‘^string^string2’ which takes the last command, replaces string with string2 and executes it
sodu apt-install java^sodu^sudo
rename
$ lsthis_has_text_to_find_1.txtthis_has_text_to_find_2.txtthis_has_text_to_find_3.txtthis_has_text_to_find_4.txt$ rename 's/text_to_find/been_renamed/' *.txt$ lsthis_has_been_renamed_1.txtthis_has_been_renamed_2.txtthis_has_been_renamed_3.txtthis_has_been_renamed_4.txt
How to list only subdirectories in the current one ?
ls -d */
0 0
- 一些有用的bash命令记录汇总
- 有用的Bash命令
- 一些Linux有用的操作命令记录
- 一些有用的命令
- 一些有用的命令
- 一些有用的命令
- 一些有用的命令
- 记录一些有用的快捷键
- 记录一些有用的URL
- 一些有用的软件记录
- 记录一些有用的网站
- 记录一些有用的网站
- 一些有用的资料记录
- CMD的一些有用命令
- 一些有用的DOS命令
- 一些有用的linux命令
- 一些有用的dos命令
- linux 一些有用的命令
- 北京传智播客最后一期Net就业
- PAT-A1090
- another app is currently holding the yum lock;waiting for it to exit
- 313. Super Ugly Number
- 【Codeforces Round #403】Codeforces 781D Axel and Marston in Bitland
- 一些有用的bash命令记录汇总
- Android:控件AutoCompleteTextView 自动提示
- SpringMVC + MyBatis + Mysql + Redis(作为二级缓存) 配置
- vc p2p demo
- 洛谷P1144 最短路计数(spfa)
- 使用Vue框架实现NGA客户端
- 【JZOJ 3623】【SDOI2014】数表
- uva/6-12 572
- Linux下进程间通信方式——管道