标签:profile int hid print gac blog mac man net
用sed命令怎么打印文件中的最后一行
https://zhidao.baidu.com/question/1431848772803799419.html
执行下面2个命令
1、awk ‘NF{a=$0}END{print a}‘ file.txt
2、sed ‘/^$/!h;$!d;g‘ file.txt
在下载了一个大文件之后,需要对他进行拆分
[root@uhadoop-mzwc2w-master2 hadoop-yarn]# split -b 50M yarn-hadoop-resourcemanager-uhadoop-mzwc2w-master2.log.12_20190708 20190707resourcemanagerlog
split命令详解 https://www.cnblogs.com/machangwei-8/p/9570866.html
[root@uhadoop-mzwc2w-master2 hadoop-yarn]# ll
total 2326868
-rw-r--r-- 1 root root 52428800 Jul 11 15:21 20190707resourcemanagerlogaa
-rw-r--r-- 1 root root 52428800 Jul 11 15:21 20190707resourcemanagerlogab
-rw-r--r-- 1 root root 237 Jul 11 15:21 20190707resourcemanagerlogac
Linux系统下删除乱码文件或者目录,rm删除不了
https://blog.csdn.net/llbacyal/article/details/24411803
其实可以根据索引节点(i节点) 进行删除。
ll -i
792812 -rw-r--r-- 1 root root 8560 Sep 10 2018 ping.sh
786451 -rw-r--r-- 1 root root 2854 Dec 28 2018 profile
796847 drwxr-xr-x 2 root root 4096 Jun 11 14:03 scripts
792725 -rw-r--r-- 1 root root 0 Jul 11 18:33 ]??Z?3?u?7??
[root@uhadoop-mzwc2w-master1 ~]# find . -inum 792725 -exec rm {} -rf \;
[root@uhadoop-mzwc2w-master2 hadoop-yarn]# split -b 50M yarn-hadoop-resourcemanager-uhadoop-mzwc2w-master2.log.12_20190708 20190707resourcemanagerlog
split命令详解 https://www.cnblogs.com/machangwei-8/p/9570866.html
标签:profile int hid print gac blog mac man net
原文地址:https://blog.51cto.com/12445535/2556540