摘要: 删除大小为0字节的文件:find . -name "*" -type f -size 0c | xargs -n 1 rm -f删除100字节的文件:find . -name "*" -type f -size 100c | xargs -n 1 rm -f... 阅读全文
posted @ 2018-12-22 20:44 xuejianbest 阅读(712) 评论(0) 推荐(0) 编辑
摘要: vsftpd是一个开源免费的搭建ftp服务器的工具安装:yum install vsftpdservice vsftpd startservice vsftpd statuschkconfig vsftpd on # 开机启动,centos 6注意防火墙,防... 阅读全文
posted @ 2018-12-22 20:44 xuejianbest 阅读(819) 评论(0) 推荐(0) 编辑
摘要: 查看当前文件夹和其下直接子目录占用的磁盘空间:du -h --max-depth=1 .# 12K ./genfile# 5.1M ./metastore_db# 1.2G ./spark-warehouse# 8.0K ./sql# 29G ./data#... 阅读全文
posted @ 2018-12-22 20:44 xuejianbest 阅读(106) 评论(0) 推荐(0) 编辑
摘要: # 查看内存信息cat /proc/meminfo# 查看CPU型号cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c# 物理CPU个数cat /proc/cpuinfo| grep "physical... 阅读全文
posted @ 2018-12-22 20:44 xuejianbest 阅读(145) 评论(0) 推荐(0) 编辑
摘要: /etc/profile下面加入:if [ -f /opt/evn.sh ]; then . /opt/evn.shfi/opt/evn.sh内容:alias cls='clear'PS1='\n*********************** ... 阅读全文
posted @ 2018-12-22 20:44 xuejianbest 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 系统版本:cat /etc/issue #通用cat /etc/redhat-release # 适用于RedHat CentOS另外查看系统位数、内核版本等:uname --helpUsage: uname [OPTION]...Print certain... 阅读全文
posted @ 2018-12-22 20:44 xuejianbest 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 使用ftp共享文件要注意文件权限,ftp用户就是linux下的普通用户,若用户没有文件或目录的权限访问会出错。具体权限控制参考博文文件权限。下载ftp服务器上的文件:wget ftp://ftpuser:password@45.32.132.31/root/... 阅读全文
posted @ 2018-12-22 20:44 xuejianbest 阅读(5871) 评论(0) 推荐(0) 编辑
摘要: 用户:创建用户:useradd -d /home/abc -g group1 -s /sbin/nologin参数:-c:加上备注文字,备注文字保存在passwd的备注栏中。 -d:指定用户登入时的启始目录。-D:变更预设值。-e:指定账号的有效期限,缺省表... 阅读全文
posted @ 2018-12-22 20:44 xuejianbest 阅读(221) 评论(0) 推荐(0) 编辑
摘要: gcc默认可能将程序编译为64为,若想强制让其将程序编译为32位,则:yum install glibc-devel.i686 gcc -m32 t.cfile a.out./a.out 阅读全文
posted @ 2018-12-22 20:43 xuejianbest 阅读(3908) 评论(0) 推荐(0) 编辑
摘要: 如果在执行./configure命令的时候(或其他情况下)报如下错误:(找不到c编译器)configure: error: no acceptable C compiler found in $PATH可能的原因是未安装gcc,用如下命令安装:Redhat ... 阅读全文
posted @ 2018-12-22 20:43 xuejianbest 阅读(222) 评论(0) 推荐(0) 编辑