shell常用命令
来源:互联网 发布:软件代理招商方案 编辑:程序博客网 时间:2024/06/07 00:41
1. $0当前路径
2. basename /usr/local/test.sh ->test.sh
dirname /usr/local/test.sh ->/usr/local
3. 两个文件合并 cat file1 file2 >>hold_file
4. 读入文件
cat filename | while read line
do
echo $line
done
5.压缩为.Z文件,原文件不存在
compress filename -v
uncompress filename.Z
6. 比较文件的不同
diff filename1 filename2 -c 标准输出
7.占用块大小 512字节
du -a/-s
8.文件属性
file filename
9.显示文件前几行
head -20 filename
10.显示登录名
logname
11.显示文件行号
nl filename
cat filename | wc -l
12.保存会话信息,不知道干什么用的
script mylogfile
13.更新时间戳 文件创建时间
touch filename
14.whereis
15.显示当前终端
tty
0 0
- shell常用命令
- shell 常用命令
- shell 常用命令
- shell常用命令
- shell 常用命令
- shell常用命令
- shell常用命令
- shell常用命令
- shell常用命令
- shell常用命令
- shell常用命令
- shell 常用命令
- shell 常用命令
- Shell常用命令
- Shell 常用命令
- shell 常用命令
- shell常用命令
- shell常用命令
- @Override must override a superclass method 问题解决
- 分布式机器学习的故事
- Activity
- 获取下一天日期
- some functions of matlab used for digital images processing
- shell常用命令
- 找到结构体数组某个属性满足条件的其他属性\或满足属性条件的样本
- 获取CPUID
- 数组(一)------模拟ArrayList
- 免费的各类API接口
- 安卓中状态选择器和颜色选择器的使用
- oracle 11g 导入数据库,表空间超过32G的解决办法
- 六种方式实现hibernate查询,及IDE推荐
- 从数据库A复制数据到数据库B,视图不可用