摘要: Linux基础入门 常用Linux命令 linux学习笔记-1.man_page linux学习笔记-2.常用命令 linux学习笔记-3.文件相关命令 linux学习笔记-4.系统命令 linux学习笔记-5.用户和组 linux学习笔记-6.权限 linux学习笔记-7.文件属性 linux学习 阅读全文
posted @ 2019-03-18 22:53 二叉树的博客 阅读(193) 评论(0) 推荐(0)
摘要: 1.查看用户最近登录情况 lastlastlog 2.查看硬盘使用情况 df 3.查看文件大小 du 4.查看内存使用情况 free 5.查看文件系统 /proc 6.查看日志 ls /var/log/ 7.查看系统报错日志 tail /var/log/messages 8.查看进程 top 9.结 阅读全文
posted @ 2019-03-18 22:42 二叉树的博客 阅读(188) 评论(0) 推荐(0)
摘要: 1.新建一个文件 touch a.txt> b.txt 2.错误重定向:2> find /etc -name zhaoxing.txt 2> error.txt 3.将正确或错误的信息都输入到log.txt中 find /etc -name passwd > /tmp/log.txt 2>&1fin 阅读全文
posted @ 2019-03-18 22:41 二叉树的博客 阅读(242) 评论(0) 推荐(0)
摘要: 1.cut截取以:分割保留第七段 grep hadoop /etc/passwd | cut -d: -f7 2.排序 du | sort -n 3.查询不包含hadoop的 grep -v hadoop /etc/passwd 4.正则表达包含hadoop grep 'hadoop' /etc/p 阅读全文
posted @ 2019-03-18 22:38 二叉树的博客 阅读(187) 评论(0) 推荐(0)
摘要: 1.gzip压缩 gzip a.txt 2.解压 gunzip a.txt.gzgzip -d a.txt.gz 3.bzip2压缩 bzip2 a 4.解压 bunzip2 a.bz2bzip2 -d a.bz2 5.将当前目录的文件打包 tar -cvf bak.tar .将/etc/passw 阅读全文
posted @ 2019-03-18 22:36 二叉树的博客 阅读(174) 评论(0) 推荐(0)
摘要: 1.查找可执行的命令 which ls 2.查找可执行的命令和帮助的位置 whereis ls 3.查找文件(需要更新库:updatedb) locate hadoop.txt 4.从某个文件夹开始查找 find / -name "hadooop*"find / -name "hadooop*" - 阅读全文
posted @ 2019-03-18 22:34 二叉树的博客 阅读(209) 评论(0) 推荐(0)
摘要: ia/Ao/Or + ?替换 0:文件当前行的开头$:文件当前行的末尾G:文件的最后一行开头1 + G到第一行9 + G到第九行 = :9 dd:删除一行3dd:删除3行yy:复制一行3yy:复制3行p:粘贴u:undoctrl + r:redo "a剪切板a"b剪切板b "ap粘贴剪切板a的内容 阅读全文
posted @ 2019-03-18 22:31 二叉树的博客 阅读(211) 评论(0) 推荐(0)
摘要: 1.查看文件夹属性 ls -ld test 2.文件夹的rwx --x:可以cd进去r-x:可以cd进去并ls-wx:可以cd进去并touch,rm自己的文件,并且可以vi其他用户的文件-wt:可以cd进去并touch,rm自己的文件 ls -ld /tmpdrwxrwxrwt的权限值是1777(s 阅读全文
posted @ 2019-03-18 22:29 二叉树的博客 阅读(154) 评论(0) 推荐(0)
摘要: 1、创建a.txt和b.txt文件,将他们设为其拥有者和所在组可写入,但其他以外的人则不可写入 chmod ug+w,o-w a.txt b.txt 2、创建c.txt文件所有人都可以写和执行 chmod a=wx c.txt 或chmod 666 c.txt 3、将/mydir目录下的所有文件与子 阅读全文
posted @ 2019-03-18 22:27 二叉树的博客 阅读(215) 评论(0) 推荐(0)
摘要: 1、添加一个tom用户,设置它属于users组,并添加注释信息 useradd tom usermod -g users tom usermod -c "hr tom" tom useradd -g users -c "hr tom" tom 2、设置tom用户的密码 passwd tom 3、修改 阅读全文
posted @ 2019-03-18 22:22 二叉树的博客 阅读(314) 评论(0) 推荐(0)
摘要: @Param注解的用法解析 阅读全文
posted @ 2019-03-18 20:36 二叉树的博客 阅读(777) 评论(0) 推荐(0)