惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - 拓子

.net编码规则 tensorflow mnist The tensorflow simplest calculate python opencv english opencv 图片识别 随机概率 从excel 导入数据绘制 散点图 tensor flow 线性回归 一些搞笑,但有意义的图片 基于python玩转人工智能最火框架之TensorFlow人工智能&深度学习介绍 win10 64下anaconda4.2.0(python3.5) PYTHON 爬虫 baidu美女图片 falkonry python hadoop wordcout测试 CENTOS重新安装JDK 搭建Hadoop的环境 目录和权限
centos基本命令
拓子 · 2018-12-30 · via 博客园 - 拓子

$>ls
$>ls --help //查看命令帮助
$>man ls //查看命令帮助

$>clear //清屏
$>cd /home //切换目录
$>cd . //进入当前目录
$>cd .. //进入上级目录
$>cd /home/admin//进入绝对路径

$>pwd //显式当前目录
$>whoami //显式当前用户名

$>su root //切换用户,输入密码,swith user
$>passwd //修改当前用户的密码

$>ifconfig //查看ip地址
$>ping localhost //查看网络连通情况
$>ping www.163.com //查看网络连通情况


$>su admin //切换用户
$>cd /home/admin //到用户目录
$>cd ~ //回到主目录
$>cd - //回到上次的目录
$>ll //别名,ls -l --autocolor...
$>alias //查看所有的别名
$>ls -a -l -h //查看当前目录-h:人性化 -l:列表 -a:显式.开头
$>mkdir ~/Downloads/a //创建目录
$>touch ~/Downloads/a/1.txt //创建文件
$>echo helloworld > 1.txt //重定向输出(覆盖)
$>echo helloworld >> 1.txt //重定向输出(追加模式)
$>cat 1.txt //查看文件
$>cp 1.txt 2.txt //复制文件
$>rm 1.txt //删除文件
$>rm -rf / //强行递归删除
$>mv a.txt tmp/ //强行递归删除


[centos client中切换模式]
ctrl + alt + f6 //切换到文本模式
ctrl + alt //切换鼠标
ctrl + alt + f1 //切换桌面模式.
ctrl + alt + f5 //切换到新的文本模式


$>more a.txt //分屏显式
q:退出
h:帮助
$>more -5 a.txt //显式前5行内容
$>tail a.txt //最后10行内容

$>find . | more // | 是管道符,前面的命令的输出作为后面命令输入。
$>find ~
$>ls -aR ~ //递归显式主目录所有的文件.(a表示包含.开头的文件)
$>head a.txt //显式前10行
$>head -n 10 a.txt //显式前10行
$>head -10 a.txt //显式前10行

$>tail a.txt
$>tail -n 20 a.txt
$>tail -20 a.txt
$>tail --lines=20 a.txt

$>wc -c -l -w a.txt //统计文本信息,
//显式统计信息-c:字节 -l:line -w:word

$>hostname //查看主机名称
$>uname -a //查看系统内核

$>file xxx.xx //查看文件类型
$>gzip a.txt //原地压缩
$>gzip -d a.txt //原地压缩
$>gzip -dr tmp //递归操纵文件夹下的文件
$>gunzip a.txt.gz //等价于gzip -d a.txt

$>tar -cvf my.tar 1.txt tmp //创建归档文件
$>tar -vxf my.tar //解档文件
$>find . | grep txt | cp `xargs` temp //xargs是多行变单行,使用空格替换回车换行符.
//`` : 是强制命令解析。
$>ping `cat a.txt` //命令嵌套
$>which echo //查看命令的文件路径