![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux命令
文章平均质量分 56
iteye_15049
这个作者很懒,什么都没留下…
展开
-
linux重定向
编辑本段基本IO cmd > file 把 stdout 重定向到 file 文件中; cmd >> file 把 stdout 重定向到 file 文件中(追加); cmd 1> file 把 stdout 重定向到 file 文件中; cmd > file 2>&1 把 stdout 和 stderr 一起重定向到 file 文件中; cmd 2> file 把 ...原创 2012-05-02 09:36:38 · 80 阅读 · 0 评论 -
Linux中ls对文件进行按大小排序和按时间排序
Linux中ls对文件进行按大小排序和按时间排序 一、使用sort排序 [root@vps ~]# ll | grep '^[^d]' | sort -n -rw------- 1 root root 0 Aug 4 19:21 ipp.txt -rw------- 1 root root 232 Aug 4 19:23 op...原创 2012-05-07 10:49:40 · 616 阅读 · 0 评论 -
shell比较两个字符串是否相等
shell比较两个字符串是否相等 来源: ChinaUnix博客 日期: 2008.12.31 11:03 (共有条评论) 我要评论 比较两个字符串是否相等的办法是: if [ "$test"x = "test"x ]; then 这里的关键有几点: 1 使用单个等号 2 注意到等号两边各有一个空格:这是unix shell的要求 3 注意到"$test"x最后的x,这是特意...原创 2012-05-07 11:00:28 · 231 阅读 · 0 评论 -
linux 有线上网
1. 在命令行下输入sudo vi /etc/network/interfaces 打开文件,将其修改为: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.0.178 netmask 255.255.255.0 ...原创 2012-05-12 21:31:20 · 180 阅读 · 0 评论