摘要: defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder //显示隐藏文件 defaults write com.apple.finder AppleShowAllFiles No && killall Finde 阅读全文
posted @ 2017-03-29 10:47 whiteprism 阅读(229) 评论(0) 推荐(0) 编辑
摘要: linux服务器查看公网IP信息的方法 最近在解决网络问题时,需要查看本机的出口公网IP信息,所以在网络上搜索和请求运维达人,获得如下两个方法: curl ifconfig.me 在linux系统中输入上述的命令,可以查看到本机连接的公网信息;如果该命令无效,可以使用下面一个命令,也同样可以获得对应 阅读全文
posted @ 2017-03-28 18:53 whiteprism 阅读(224) 评论(0) 推荐(0) 编辑
摘要: [root@linux ~]# free [-b|-k|-m|-g] [-t] 参数: -b :直接输入 free 时,显示的单位是 Kbytes,我们可以使用 b(bytes), m(Mbytes) k(Kbytes), 及 g(Gbytes) 来显示单位喔! -t :在输出的最终结果,显示物理内 阅读全文
posted @ 2017-03-28 18:40 whiteprism 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 打开/etc/sudoers 文件 使用者账号 登入的主机 = (可以变换的身份) 可以下达的指令 root ALL=(ALL) ALL 设置群组admin下的用户都能使用sudo: %admin ALL=(ALL) ALL 设置使用sudo时不需要输入密码: %admin ALL=(ALL) NO 阅读全文
posted @ 2017-03-27 09:39 whiteprism 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 例:删除/home/raven下,包括子目录里所有名为abc.txt的文件: find /home/raven -name abc.txt | xargs rm -rf 如果不使用xargs,则为: find /home/raven -name abc.txt -exec rm -fv {} \; 阅读全文
posted @ 2017-03-22 14:02 whiteprism 阅读(19212) 评论(0) 推荐(0) 编辑
摘要: 链接: http://blog.csdn.net/bluishglc/article/details/44276637 设置之后又遇到问题,虚拟机连不了外网,解决方案如下: http://www.linuxidc.com/Linux/2017-03/141585.htm 阅读全文
posted @ 2017-03-19 18:07 whiteprism 阅读(108) 评论(0) 推荐(0) 编辑
摘要: ①把本机公钥加到要访问的主机的authorized_keys中:ssh-copy-id -i ~/.ssh/id_rsa.pub "-p port user@192.168.1.211" ②登录:ssh user@192.168.1.211 阅读全文
posted @ 2017-03-17 15:51 whiteprism 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 打包:tar -cvf file.tar file.txt 压缩:tar -czvf file.tar.gz file.txt 解包:tar -xvf file.tar 解压:tar -xzvf file.tar.gz 阅读全文
posted @ 2017-03-17 15:43 whiteprism 阅读(326) 评论(0) 推荐(0) 编辑
摘要: lsof(list open files)是一个列出当前系统打开文件的工具。在linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件。所以如传输控制协议 (TCP) 和用户数据报协议 (UDP) 套接字等,系统在后台都为该应用程序分配了一个文件描述符, 阅读全文
posted @ 2017-03-17 14:00 whiteprism 阅读(233) 评论(0) 推荐(0) 编辑
摘要: WGET下载https链接及WGET命令的详解 使用如下的命令下载https链接:wget -r -np -nd --accept=gz --no-check-certificate https://www.xxx.com/dir/ --http-user=username --http-passw 阅读全文
posted @ 2017-03-17 13:55 whiteprism 阅读(213) 评论(0) 推荐(0) 编辑