asuerhao's Blog

如果有什么做的不到的地方请尽管留言, 我会改进的 : )

在Linux下几款常用命令行工具简介 (持续更新) (基本的文件处理命令不算在内)

asuerhao posted @ 2012年4月01日 19:05 in 积累 with tags linux 命令行 工具 , 4379 阅读

1. aptitude

    Apt的高级版本,可以更加智能的帮你解决依赖问题, 用Apt无法解决的依赖问题可以尝试用它。

 

2. sdcv

    StarDict的命令行版, 命令后面直接跟单词列表就可以了. 支持单词以‘/’开头的模糊查询(Fuzzy Search)和以‘|’开头的全文查询(Full-test Search),还支持正则表达式中的‘?’和'*'. 不过好像查询结果条目过多的话会出现Bug,只能用'<Ctrl+Enter>'组合键确定输入.

示例:

$  #查询字典中所有以ove结尾的四个字符的单词.

sdcv '?ove'

Found 2 items, similar to ?ove.

0)CET4-->love

1)CET4-->move

Your choice[-1 to abort]: 1 <Ctrl+Enter>

-->CET4

-->love

[lʌv]

n. 爱,恋爱,爱情

vt. 爱,热爱,喜欢

.......

 

3. nmap

    端口扫描工具, 学习服务器搭建时经常用到. 专门用来扫描某主机所开放的端口,提供的服务,操作系统版本,所用的包过滤器和防火墙.

示例:

$ nmap localhost

Starting Nmap 5.21 ( http://nmap.org ) at 2012-04-01 18:07 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00043s latency).
Not shown: 990 closed ports
PORT     STATE SERVICE
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
631/tcp  open  ipp
902/tcp  open  iss-realsecure
3689/tcp open  rendezvous
Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds

 

4. nbtscan

    在学习Linux网络维护时用到的,用于查询网络中的NetBIOS信息. 它会尽量返回某一主机的IP地址, 计算机在网络中的名字MAC地址等信息.

示例:

btscan 192.168.1.29
Doing NBT name scan for addresses from 192.168.1.29
IP address       NetBIOS Name     Server    User               MAC address      
--------------------------------------------------------------------------------------------------------
192.168.1.29     SUBUNTU          <server>  SUBUNTU     00:00:00:00:00:00

 

5. bc

    一个任意精度的可编程的计算器工具.支持简单变量(simple variable)和数组(array), 支持算数运算, 赋值, 关系运算, 逻辑运算, 支持函数和控制结构.

示例:

$  #进制转换

$  echo 'obase=16; 255' | bc

FF

 

6. xdotool

    可以为键盘输入和鼠标动作进行编程,很好玩儿的一个工具.它可以帮你打游戏,帮你听网络公选课,帮你做所有需要鼠标或键盘去重复操作才能完成的无脑操作.

示例:

#  #让鼠标每隔一段时间便单击屏幕上某一特定区域,然后我的网络公选课程一晚就听完了.

$ cat MouseMotion.sh

#! /bin/bash

while (true)
do
    xdotool mousemove 50 50; xdotool click 1
    notify-send "下一部"
    echo -ne "$(date)\n" >> ~/xdot.log
    sleep $((30*60+$RANDOM%5*20))
done

 

7. xsel

    管理X的剪切板. X公有三个剪切板, 分别称为主(PRIMARY),次(SECONDARY)和CLIPBOARD,分别可以通过选项-p, -s, -b制定操作的剪切板.

示例:

$  #将字符串放入CLIPBOARD中:

$  echo -n 'I love you' | xsel -b

 

8. notify-send

    发送桌面提示,在Ubuntu下由libnotify-bin包提供.

示例:

notify-send '该睡觉了'

 

9. zenity

    显示GTK+风格的对话框.我们可以在脚本中使用zenity命令为用户展示一个交互的窗口,可以用来显示一个日历(返回用户选择的日期)、显示错误信息(返回真假)、显示文本输入对话框(返回用户输入文本)等等.你还可以通过一系列选项控制交互式窗口的样式.

示例:

$  #显示一个范围从0到10的标尺对话框

zenity --scale --title='标尺' --text='请选择' --min-value=0 --max-value=10

 

10. tee

    tee命令可以同时将标准输入写往文件和标准输出. 用awk或sed编辑文件时候, 配合tee命令可以直接修改原文件(类似sed的-i选项, 不过sed无法将结果再送到标准输出).

    示例:

$  seq 3 | tee hi

  1

  2

  3

$ cat hi | sed -e 1d | tee hi

  2

  3

$ cat hi

  2

  3

 

10.  screen

  远程登录Linux的时候是否觉得一个终端不够用? 这时您可以使用screen提供的虚拟终端功能, 在同一物理终端运行多个交互式Shell. 注意, screen没有类似emacs的分屏功能, 同一时刻它只能显示一个屏幕. 创建多个虚拟终端后, 您需要利用键绑定在不同终端间切换.

示例:

$  #创建一个执行'vi /etc/hosts'命令的虚拟终端:

$  screen vi /etc/hosts

$  #再次创建一个虚拟终端:

$  <Ctr-a> + c

$  #查看当前所有已创建的虚拟终端:

$ <Ctr-a> + "

$  #返回之前的虚拟终端:

$ <Ctr-a> + p

$  #进入下一个虚拟终端:

$  <Ctr-a> + n

  screen的选项和键绑定的详细情况请参照其手册页.

 

11. wget, axel

  命令行下载工具. wget仅支持HTTP, HTTPS和FTP协议. wget支持断线重连, 可在差网络环境下载大文件, 还可以追踪网页链接以复制整个网站. axel, 下载加速工具, 支持HTTP, HTTPS和FTP. axel通过打开多个链接将文件分段下载.

Avatar_small
依云 说:
2012年4月01日 19:53

你的网络公选课支持 Linux?真幸福。。。

Avatar_small
asuerhao 说:
2012年4月01日 21:23

嗯,用支持JavaScript的浏览器看就行了,

Avatar_small
λ 说:
2012年4月02日 14:49

本来把StarDict删了用GoldenDict的,可惜GoldenDict没命令行模式,装了sdcv,不错~一下就找到以-gry结尾的第三个单词的答案

Avatar_small
cleaning companies d 说:
2020年2月23日 13:09

It happens to be easy enough to search out at least a couple commercial carpet cleaners service companies in your city just from looking in your yellow articles, checking typically the advertising a natural part of your rag, or conducting a search over the internet. The alternative is to read a touch more about each of the professional carpet cleaners companies you are considering so that you will feel confident which are chosen the correct one. Following are actually some tips to guide you decide.

Avatar_small
Mike 说:
2020年4月23日 06:22

Very helpful blog post! There is a great deal of information here that can assist any organisation get started with an effective social networking campaign. Funny Wifi Names 2020

Avatar_small
Matt 说:
2020年4月28日 05:26

I examine your blog every day as well as try to learn something from your blog site. Thank you as well as waiting for your new post.

Avatar_small
Ric Thomas 说:
2020年5月01日 09:13

Positive site, where did u create the details on this publishing? I have checked out a few of the write-ups on your web site currently, and I really like your design. Thanks a million as well as please keep up the effective work.  kbc winner

Avatar_small
Ric Thomas 说:
2020年5月02日 05:30

You got a wonderful blog.
I will certainly have an interest in even more comparable topics.
I see you obtained really extremely valuable topics,
I will certainly be constantly checking your blog site thanks.  jio lottery winner,kbc lottery

Avatar_small
Ric Thomas 说:
2020年5月02日 20:29

You actually make it look so easy with your efficiency but I find this matter to be in fact something which I believe I would never ever comprehend.
It appears very broad as well as well challenging for me. I'm expecting your following message,
I'll attempt to master it! kbc lottery

Avatar_small
Ric Thomas 说:
2020年5月08日 14:24

Pretty wonderful article. I just stumbled upon your weblog and also wished to claim that I have actually truly taken pleasure in browsing your post. I'll be subscribing to your feed and also I wish you write once more quickly! kbc head office number

Avatar_small
Ric Thomas 说:
2020年5月08日 15:36

Hi there, I discovered your site by means of Google while looking for a related subject, your site showed up, it looks excellent. I have actually bookmarked it in my google book markings. kbc winner

Avatar_small
Ric Thomas 说:
2020年5月08日 15:38

I check out a great deal of blog articles,
but I never ever listened to a subject l   kbc lottery winner

Avatar_small
Ric Thomas 说:
2020年5月08日 16:07

Extremely great blog site and posts. I am truly very delighted to see your blog site. Now I am found which I actually want. I inspect your blog daily as well as attempt to find out something from your blog site. Thank you and also awaiting your brand-new blog post. kbc lottery

Avatar_small
Ric Thomas 说:
2020年5月11日 23:21

I obtained way too much fascinating things on your blog. I think I am not the just one having all the pleasure right here! Maintain up the good work. kbc

Avatar_small
Ric Thomas 说:
2020年5月11日 23:46

Believe it or otherwise, it is the kind of info I've long been looking for. It matches my requirements a great deal. Thank you for creating this details. kbc registration

Avatar_small
Ric Thomas 说:
2020年5月11日 23:52

I check out a whole lot of blog posts, however I never ever heard a topic like this. I Love this topic you made regarding the blog owner's container checklist. kbc lottery

Avatar_small
Andrew Strauch 说:
2020年5月23日 09:48

I obtained so engaged in this material that I could not wait to check out. Many thanks. kbc winner list

Avatar_small
Andrew Strauch 说:
2020年5月23日 09:59

Superior blog post, stay on top of this outstanding job. It's good to understand that this subject is being additionally covered on this internet website so joys for making the effort to review this! Many thanks once again and also again! kbc lottery winner

Avatar_small
Andrew Strauch 说:
2020年5月23日 10:34

Outstanding post. Thanks to this blog my expedition has finished. kbc contact number

Avatar_small
Andrew Strauch 说:
2020年5月23日 10:45

Your work is truly valued round the world as well as the clock.
It is a practical and exceptionally extensive blog site. kbc lottery winner

Avatar_small
Andrew Strauch 说:
2020年5月23日 11:13

I'm certain that you will certainly be making an actually useful place. Excellent perform! kbc lottery

Avatar_small
Andrew Strauch 说:
2020年5月25日 14:52

I inspect your blog every day as well as try to learn something from your blog. T
hanks and waiting for your new message.  best email marketing app for shopify

Avatar_small
Andrew Strauch 说:
2020年5月28日 12:11

Positive website, where did u create the details on this publishing? I have actually read a few of the write-ups on your website now, and I actually like your design. Many thanks a million and please keep up the efficient job. jio lottery 2020

Avatar_small
Andrew Strauch 说:
2020年5月28日 12:17

Your job is truly valued round the globe and also the clock. It is a useful and also unbelievably thorough blog. kbc winner 2020

Avatar_small
Andrew Strauch 说:
2020年6月05日 06:52

Favorable site, where did u think of the details on this posting? I have checked out a few of the posts on your internet site currently, and also I really like your design. Thanks a million as well as please maintain the effective work. kbc winner list

Avatar_small
Andrew Strauch 说:
2020年6月05日 07:54

Great Article it's really informative and also innovative maintain us posted with brand-new updates. its was really valuable. many thanks a lot. kbc lottery winner

Avatar_small
Andrew Strauch 说:
2020年6月05日 10:26

I'm sure that you will certainly be making a really useful place. Great carry out! kbc contact number

Avatar_small
Andrew Strauch 说:
2020年6月05日 10:29

This is an incredible blog post I have seen due to the fact that of the deal it. It is actually what I anticipated to see rely on the future you will continue in sharing such a wonderful blog post. kbc lottery winner

Avatar_small
Andrew Strauch 说:
2020年6月05日 11:24

Normal sees provided below are the simplest method to value your energy, which is why I am going to the internet site every day, looking for brand-new, interesting information. Thank you! kbc lottery

Avatar_small
Andrew Strauch 说:
2020年6月05日 11:26

Superb post. I was always inspecting this blog, as well as I'm pleased! Incredibly useful info specifically the last part, I take care of such info a great deal. I was exploring this certain information for a lengthy time. Thanks to this blog site my expedition has ended. kbc winner 2021

Avatar_small
Andrew Strauch 说:
2020年6月05日 11:29

No question this is an excellent message I got a great deal of expertise after checking out best of luck. The style of the blog is superb there is nearly everything to read, Brilliant article. jio lottery 2021

Avatar_small
Andrew Strauch 说:
2020年6月07日 06:59

Positive site, where did u come up with the details on this uploading? I have checked out a few of the short articles on your web site now, and also I really like your design. Many thanks a million as well as please maintain the efficient work. dog training collar

Avatar_small
Andrew Strauch 说:
2020年6月12日 10:49

Fabulous message, you have represented out some fantastic points, I furthermore assume this s a really wonderful site. I will see once more for even more top quality web content and also, suggest this website to all. Many thanks. kbc lottery 2021

Avatar_small
Andrew Strauch 说:
2020年6月12日 11:34

Because of the offer it, this is a wonderful article I have seen. It is actually what I expected to see count on the future you will proceed in sharing such a mind-blowing message. kbc head office number

Avatar_small
Andrew Strauch 说:
2020年6月12日 11:55

I inspect your blog site every day and try to discover something from your blog site. Thank you as well as waiting for your brand-new blog post. jio lottery winner

Avatar_small
Andrew Strauch 说:
2020年6月12日 13:22

Superb article. I was constantly checking this blog, and I'm impressed! Incredibly beneficial info specially the last part, I take care of such information a whole lot. I was exploring this certain details for a long period of time. Many thanks to this blog site my expedition has finished. kbc lottery winner 2021

Avatar_small
Andrew Strauch 说:
2020年6月12日 13:25

No question this is an outstanding message I obtained a great deal of understanding after reading best of luck. The motif of the blog is outstanding there is nearly every little thing to review, Brilliant post. kbc lucky draw 2021

Avatar_small
Andrew Strauch 说:
2020年6月12日 14:02

Fantastic task here on. I review a great deal of blog articles, yet I never ever heard a subject such as this. I Love this topic you made about the blog owner's container listing. Extremely clever. kbc winner list

Avatar_small
Andrew Strauch 说:
2020年6月12日 14:05

Superior blog post, stay on par with this extraordinary work. It's great to recognize that this topic is being also covered on this internet site so cheers for making the effort to discuss this! Many thanks time and again! kbc head office number

Avatar_small
Andrew Strauch 说:
2020年7月06日 18:54

Many thanks for sharing wonderful information with us. I like your blog post and also all you show to us is up to day and fairly useful, I would certainly such as to bookmark the web page so I can come below once again to read you, as you have done a remarkable task. מהאתר

Avatar_small
Andrew Strauch 说:
2020年7月10日 05:18

Very wonderful write-up, I delighted in reviewing your message, very great share, I desire to twit this to my followers. Many thanks! kbc lucky draw 2021

Avatar_small
Andrew Strauch 说:
2020年7月10日 05:22

Hi there, I found your website through Google while looking for an associated subject, your web site turned up, it looks wonderful. I have actually bookmarked it in my google book marks. kbc lottery winner 2021

Avatar_small
Andrew Strauch 说:
2020年7月11日 04:51

Really pleased! Every little thing is really clear and also extremely open explanation of problems. It includes true realities. Your website is extremely valuable. Many thanks for sharing. kbc winner list

Avatar_small
Andrew Strauch 说:
2020年7月11日 04:51

I want you to give thanks to for your time of this terrific read!!! I absolutely enjoy every bit of it and I have you bookmarked to have a look at brand-new stuff of your blog site a must-read blog site! kbc official website

Avatar_small
Andrew Strauch 说:
2020年7月15日 07:05

I check out a lot of blog posts, however I never listened to a subject like this. I Love this topic you made about the blogger's bucket listing. kbc lottery winners

Avatar_small
Andrew Strauch 说:
2020年7月16日 04:18

You have done a terrific work on this article. You have also handled to make it understandable and very easy to check out. kaun banega crorepati lottery check

Avatar_small
Andrew Strauch 说:
2020年7月16日 05:25

I obtained so engaged in this material that I could not wait to check out. Thanks. 网课代写

Avatar_small
Andrew Strauch 说:
2020年7月16日 05:27

I can not wait to dig kickoff and deep utilizing resources that I obtained from you. Your liveliness is rejuvenating. paragonpoker

Avatar_small
Andrew Strauch 说:
2020年7月16日 19:17

I check out a whole lot of blog articles, yet I never listened to a subject like this. I review a lot of blog posts, but I never heard a topic like this. Positive website, where did u come up with the info on this posting? I just stumbled upon your blog as well as wanted to state that I have actually truly enjoyed surfing your blog site messages. Positive site, where did u come up with the information on this posting? kbc whatsapp number

Avatar_small
Andrew Strauch 说:
2020年7月17日 19:03

It is genuinely a well-researched material and superb phrasing. I got so involved in this product that I couldn't wait to read. I am impressed with your job as well as ability. Thanks. kbc lottery check up

Avatar_small
Andrew Strauch 说:
2020年7月19日 06:19

Hi there, I located your internet site through Google while looking for a related subject, your website showed up, it looks wonderful. I have actually bookmarked it in my google book marks. Hppoker

Avatar_small
Andrew Strauch 说:
2020年7月19日 06:21

I'm certain that you will certainly be making a truly useful place. Good do! mybestpoker

Avatar_small
Andrew Strauch 说:
2020年7月19日 06:23

I review a whole lot of blog site messages, yet I never heard a subject like this. I check out a great deal of blog articles, but I never ever heard a topic like this. Favorable website, where did u come up with the info on this publishing? I just stumbled upon your blog and also wanted to claim that I have actually enjoyed searching your blog site posts. Positive site, where did u come up with the information on this posting? Lexispoker

Avatar_small
Andrew Strauch 说:
2020年7月21日 06:12

I review a whole lot of blog articles, however I never listened to a topic like this. I Love this topic you made regarding the blogger's bucket list. Judi Slot Online

Avatar_small
Andrew Strauch 说:
2020年7月26日 05:45

Hi there, I located your website through Google while looking for a relevant topic, your site came up, it looks terrific. I have bookmarked it in my google book markings. kbc prize winner file

Avatar_small
Andrew Strauch 说:
2020年7月26日 05:53

Really informative post! There is a lot of details below that can help any business start with a successful social networking project. Jio 25 Lakh Lottery Winner List

Avatar_small
Andrew Strauch 说:
2020年7月26日 05:53

Extremely great post, I took pleasure in reviewing your article, really good share, I want to twit this to my fans. Thanks! dndpoker

Avatar_small
Andrew Strauch 说:
2020年7月27日 05:29

Actually pleased! Whatever is very open and also really clear explanation of problems. It contains true facts. Your website is extremely beneficial. Many thanks for sharing. kbc jio lottery winner

Avatar_small
Andrew Strauch 说:
2020年7月27日 05:29

I want you to give thanks to for your time of this terrific read!!! I definitely take pleasure in every little of it and also I have you bookmarked to have a look at brand-new stuff of your blog site a must-read blog! kbc new year lucky draw 2020

Avatar_small
Andrew Strauch 说:
2020年8月08日 22:53

Thanks for sharing nice info with us. I like your blog post and all you show to us is up to date and also fairly useful, I would love to bookmark the web page so I can come right here again to read you, as you have actually done a remarkable task. 먹튀검증사이트

Avatar_small
Andrew Strauch 说:
2020年8月08日 22:53

Superb blog post. Many thanks to this blog site my expedition has finished. 먹튀커머스

Avatar_small
Andrew Strauch 说:
2020年8月12日 16:40

Favorable site, where did u create the details on this publishing? I have actually reviewed a few of the posts on your website now, and I really like your style. Thanks a million and also please maintain the efficient job. แทงบอลออนไลน์

Avatar_small
Andrew Strauch 说:
2020年9月10日 22:13

Routine brows through detailed right here are the most convenient technique to value your energy, which is why I am mosting likely to the internet site daily, looking for new, intriguing information. Thank you! บุหรี่ไฟฟ้า

Avatar_small
Andrew Strauch 说:
2020年9月24日 03:49

Fabulous post, you have actually signified out some amazing factors, I likewise believe this s a very fantastic site. I will see once more for even more top quality content and also, recommend this website to all. Many thanks. QR Code Generator

Avatar_small
Andrew Strauch 说:
2020年10月27日 06:29

I value this article for the well-researched material as well as outstanding phrasing. I got so thinking about this product that I couldn't quit reading. Your blog site is really remarkable. radio app

Avatar_small
Andrew Strauch 说:
2020年11月09日 22:32

Superior blog post, stay up to date with this outstanding work. It's wonderful to recognize that this subject is being additionally covered on this internet site so joys for taking the time to discuss this! Thanks again and once more! 卡式台胞證

Avatar_small
Andrew Strauch 说:
2020年11月11日 10:39

Positive site, where did u create the info on this posting? I have read a few of the articles on your web site currently, and I truly like your style. Thanks a million as well as please keep up the reliable job. 臺胞證

Avatar_small
Andrew Strauch 说:
2021年1月19日 06:22

Hey, what a fantastic post I have found as well as thought me I have actually been looking out for this similar type of message for past a week and rarely encountered this. Thank you very a lot and also I will certainly search for even more postings from you. notes

Avatar_small
Andrew Strauch 说:
2021年4月09日 13:49

I appreciate this short article for the well-researched web content and also outstanding wording. I obtained so thinking about this product that I could not stop reviewing. Your blog site is actually outstanding. framing a basement

Avatar_small
Andrew Strauch 说:
2021年5月09日 03:00

Since of the offer it, this is a magnificent blog post I have actually seen. It is actually what I anticipated to see rely on the future you will certainly proceed in sharing such a mind-blowing post. Relx

Avatar_small
Andrew Strauch 说:
2021年6月24日 04:48

Great post yet I was asking yourself if you could create a little bit extra on this subject? If you might specify a little bit additional, I would certainly be really happy. Value it! eprimefeed.com Latest News Economy Politics Tech Sports Movies Fashion Life & Style الإخبارية

Avatar_small
Andrew Strauch 说:
2021年12月08日 07:39

I really took pleasure in analysis this blog post, huge follower. Maintain the great and please tell me when can you publish more articles or where can I read a lot more on the subject? joker123 online

Avatar_small
Andrew Strauch 说:
2021年12月14日 05:56

Favorable website, where did u create the details on this posting? I have read a few of the short articles on your internet site currently, and I actually like your style. Thanks a million and please keep up the reliable work. Normanton Park

Avatar_small
Andrew Strauch 说:
2022年6月18日 10:12

I inspect your blog site every day and attempt to learn something from your blog site. Thank you as well as waiting for your brand-new article. resume builder


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter