`
raojl
  • 浏览: 206960 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

花三分钟看看这个文档

阅读更多
linux 命令精简

Unix/Linux Command Reference


.com
File Commands
ls – directory listingls -al – formatted listing with hidden files
cd dir -change directory to dir
cd – change to homepwd – show current directorymkdir dir – create a directory dir
rm file – delete file
rm -r dir – delete directory dir
rm -f file – force remove file
rm -rf dir – force remove directory dir *
cp file1 file2 – copy file1 to file2
cp -r dir1 dir2 – copy dir1 to dir2; create dir2 if it
doesn't exist
mv file1 file2 – rename or move file1 to file2
if file2 is an existing directory, moves file1 into
directory file2
ln -s file link – create symbolic link link to file
System Info
date – show the current date and time
cal – show this month's calendar
uptime – show current uptime
w – display who is onlinewhoami – who you are logged in as
finger user – display information about user
uname -a – show kernel information
cat /proc/cpuinfo – cpu information
cat /proc/meminfo – memory information
man command – show the manual for command
df – show disk usage
du – show directory space usagefree – show memory and swap usagewhereis app – show possible locations of app
which app – show which app will be run by default
Compression
touch file – create or update file
cat > file – places standard input into file
more file – output the contents of file
head file – output the first 10 lines of file
tail file – output the last 10 lines of file
tail -f file – output the contents of file as it
grows, starting with the last 10 lines
tar cf file.tar files – create a tar named
file.tar containing files
tar xf file.tar – extract the files from file.tar
tar czf file.tar.gz files – create a tar with
Gzip compressiontar xzf file.tar.gz – extract a tar using Gzip
tar cjf file.tar.bz2 – create a tar with Bzip2
compression
tar xjf file.tar.bz2 – extract a tar using Bzip2
gzip file – compresses file and renames it to
file.gzgzip -d file.gz – decompresses file.gz back to
file
Process Management
ps – display your currently active processes
top – display all running processes
kill pid – kill process id pid
killall proc – kill all processes named proc *
bg – lists stopped or background jobs; resume astopped job in the backgroundfg – brings the most recent job to foreground
fg n – brings job n to the foreground
Network
ping host – ping host and output results
whois domain – get whois information for domain
dig domain – get DNS information for domain
dig -x host – reverse lookup host
wget file – download file
wget -c file – continue a stopped download
File Permissions
chmod octal file – change the permissions of file
to octal, which can be found separately for user,
group, and world by adding:

4 – read (r)

2 – write (w)

1 – execute (x)
Examples:
chmod 777 – read, write, execute for all
chmod 755 – rwx for owner, rx for group and worldFor more options, see man chmod.
Installation
Install from source:
./configuremake
make install
dpkg -i pkg.deb – install a package (Debian)
rpm -Uvh pkg.rpm – install a package (RPM)
SSH Shortcuts ssh user@host – connect to host as user
ssh -p port user@host – connect to host on port
port as user
ssh-copy-id user@host – add your key to host for
user to enable a keyed or passwordless login
Ctrl+C – halts the current command
Ctrl+Z – stops the current command, resume with
fg in the foreground or bg in the background
Ctrl+D – log out of current session, similar to exit
Ctrl+W – erases one word in the current line
Ctrl+U – erases the whole line
Ctrl+R – type to bring up a recent command
!! -repeats the last commandexit – log out of current session
* use with extreme caution.
Searching
grep pattern files – search for pattern in files
grep -r pattern dir – search recursively for
pattern in dir
command | grep pattern – search for pattern in the
output of command
locate file – find all instances of file


分享到:
评论

相关推荐

    三分钟看懂ChatGPT

    《三分钟看懂ChatGPT.pdf》是一份简明扼要的资源,旨在介绍ChatGPT,这是一个基于GPT-3.5架构的大型语言模型。该资源提供了对ChatGPT的概述,包括其功能、用途和工作原理。它还提供了使用ChatGPT的一些提示和建议,...

    浙商策略:三分钟看中观,新股新赛道之十,机器人.rar

    【标题】:“浙商策略:三分钟看中观,新股新赛道之十,机器人.rar”这一标题揭示了本文档的核心内容,聚焦于机器人技术在新兴市场中的应用与投资策略。"浙商策略"通常指的是浙商证券提供的投资分析报告,旨在帮助...

    三分钟学会看键盘,教你看懂钢琴五线谱.doc

    三分钟学会看键盘,教你看懂钢琴五线谱.doc

    Teamdoc文档管理系统 v2.0.30.zip

    公司有很多财务报表,合同文档,客户资料等,这些是公司的绝密资料,既然是文档总要给人看,既然给人看又怎么能防止泄密呢?您还在用共享文件夹、优盘拷贝、电子邮件这样的原始的方式传播如此重要的文档吗?您的机密...

    三分钟的幽默自我介绍精选.doc

    文档标题和描述中提到的是关于"三分钟的幽默自我介绍"的资料,这通常是指在特定场合,如求职面试、演讲比赛或社交活动中,用简短而有趣的方式介绍自己的过程。这种自我介绍旨在吸引听众的注意力,展示个人的个性、...

    三分钟看中观,9月手机出货量同比降环比增,玻璃涨价-1023-东吴证券-37页.pdf

    从提供的文件内容来看,该文档是一份东吴证券发布的证券研究报告,报告日期为2019年10月23日,标题为“三分钟看中观,9月手机出货量同比降环比增,玻璃涨价-1023”。报告主要关注的是宏观经济、行业上下游情况以及...

    三分钟倒计时PPT

    根据给定的部分内容来看,这似乎是一段模拟倒计时过程的文本。其中包含了从10秒钟开始的倒计时,并在结束时输出“TIMEUP!”字样。这段文本可以用来作为倒计时PPT中的动态元素,通过编程语言(如VBA)实现自动化更新...

    讲故事课前三分钟演讲我是小小主持人照片背景PPT学习教案.pptx

    【标题】:“讲故事课前三分钟演讲我是小小主持人照片背景PPT学习教案...综合来看,这份PPT教案是一个全面的教学工具,旨在通过精心设计的讲故事活动,培养小学生的基本演讲技能和公众表现力,同时促进他们的个人成长。

    母爱国旗下演讲三分钟.docx

    根据提供的文档信息,本文将围绕“母爱”这一主题展开,深入探讨母爱的伟大与无私,以及我们应该如何感恩母爱。 ### 母爱的伟大 母爱是一种超越时间和空间的情感,它比天空更为广阔,比大地更为深厚。母爱不仅仅是...

    CoreJPush, 三分钟,五句代码,搞定JPush.zip

    从`CoreJPush-master`这个文件名来看,这是一个包含源码的项目仓库。在这个压缩包中,你可能找到以下内容: 1. **源代码**:CoreJPush的Java或Kotlin类,包括核心功能模块、初始化模块、监听器模块等。 2. **示例...

    2021主持人大赛三分钟演讲稿模板汇集.docx

    在给定的文档中,提供了三个2021主持人大赛三分钟演讲稿的示例,分别是关于“话说长三角”、“挑战不可能”以及“瞬间故事”的演讲。这些演讲涵盖了个人经历、地区发展变化及个人成长等多个方面,旨在通过真实的故事...

    小学英语课前三分钟朗读材料.doc

    在Unit 3 "Look at…" 可能会进一步扩展物体的描述和观察,让学生学习如何用英语表达看或指代特定的物体,并可能引入更多的形容词来描述事物的外观或状态。这样的训练有助于提升学生的观察力和语言表达能力。 这些...

    三分钟温馨睡前童话故事大全.pdf

    从给定文件的内容来看,该文档是一本童话故事集,包含了三个温馨的故事,每个故事都围绕一个核心主题展开,旨在传达一定的生活道理和教育意义。下面我将对这些故事中蕴含的知识点进行详细说明: 第一个故事《小猪家...

    原码、反码、补码、位移全总结,无遗漏,含示例

    看懂了这个三分钟文档,想不学会计算机组成原理里面的位移操作都难

    扶贫助学三分钟讲话稿.docx

    从给定的文件信息来看,本文档主要涉及的是“扶贫助学”主题的演讲稿内容,具体包括了扶贫助学的意义、目的、以及对于学校建设的帮助等内容。以下是对文档中提到的关键知识点的总结和扩展: ### 扶贫助学的重要性 ...

    策略:三分钟看中观,猪价上涨,日均耗煤量回升-200219.pdf

    策略:三分钟看中观,猪价上涨,日均耗煤量回升-200219.pdf

    策略:三分钟看中观,存储器继续涨价,避险情绪推升金价-200226.pdf

    策略:三分钟看中观,存储器继续涨价,避险情绪推升金价-200226.pdf

    国旗下讲话稿初中奋力拼搏三分钟.docx

    从给定的文件信息来看,本文档主要围绕“国旗下的讲话”这一主题展开,并着重讨论了“奋力拼搏”的精神内涵及其重要性。文章通过不同角度讲述了个人经历以及著名人物的事迹来强调“奋斗”对于成功的重要性。以下是...

    母亲节国旗下演讲稿三分钟.docx

    从给定的文件信息来看,本文档主要围绕“母亲节国旗下演讲稿”这一主题展开,通过对母爱的深刻理解和感悟进行阐述。以下是从标题、描述、标签以及部分内容中提炼的相关知识点。 ### 1. 母爱的本质 - **母爱如同...

Global site tag (gtag.js) - Google Analytics