- 浏览: 1482875 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (691)
- linux (207)
- shell (33)
- java (42)
- 其他 (22)
- javascript (33)
- cloud (16)
- python (33)
- c (48)
- sql (12)
- 工具 (6)
- 缓存 (16)
- ubuntu (7)
- perl (3)
- lua (2)
- 超级有用 (2)
- 服务器 (2)
- mac (22)
- nginx (34)
- php (2)
- 内核 (2)
- gdb (13)
- ICTCLAS (2)
- mac android (0)
- unix (1)
- android (1)
- vim (1)
- epoll (1)
- ios (21)
- mysql (3)
- systemtap (1)
- 算法 (2)
- 汇编 (2)
- arm (3)
- 我的数据结构 (8)
- websocket (12)
- hadoop (5)
- thrift (2)
- hbase (1)
- graphviz (1)
- redis (1)
- raspberry (2)
- qemu (31)
- opencv (4)
- socket (1)
- opengl (1)
- ibeacons (1)
- emacs (6)
- openstack (24)
- docker (1)
- webrtc (11)
- angularjs (2)
- neutron (23)
- jslinux (18)
- 网络 (13)
- tap (9)
- tensorflow (8)
- nlu (4)
- asm.js (5)
- sip (3)
- xl2tp (5)
- conda (1)
- emscripten (6)
- ffmpeg (10)
- srt (1)
- wasm (5)
- bert (3)
- kaldi (4)
- 知识图谱 (1)
最新评论
-
wahahachuang8:
我喜欢代码简洁易读,服务稳定的推送服务,前段时间研究了一下go ...
websocket的helloworld -
q114687576:
http://www.blue-zero.com/WebSoc ...
websocket的helloworld -
zhaoyanzimm:
感谢您的分享,给我提供了很大的帮助,在使用过程中发现了一个问题 ...
nginx的helloworld模块的helloworld -
haoningabc:
leebyte 写道太NB了,期待早日用上Killinux!么 ...
qemu+emacs+gdb调试内核 -
leebyte:
太NB了,期待早日用上Killinux!
qemu+emacs+gdb调试内核
sudo !!
2009-01-26 10:26:48
User: root
801
Up
Down
Run the last command as root
Useful when you forget to use sudo for a command. "!!" grabs the last run command.
Comments (30) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
python -m SimpleHTTPServer
2009-02-05 11:57:43
User: pixelbeat
Functions: python
608
Up
Down
Serve current directory tree at http://$HOSTNAME:8000/
Comments (21) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
:w !sudo tee %
2009-02-25 16:27:24
User: skinp
Functions: tee
Tags: vim sudo tee
573
Up
Down
Save a file you edited in vim without the needed permissions
I often forget to sudo before editing a file I don't have write permissions on. When you come to save that file and get the infamous "E212: Can't open file for writing", just issue that vim command in order to save the file without the need to save it to a temp file and then copy it back again.
Comments (26) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
cd -
2009-02-04 22:41:21
User: systemj
Functions: cd
481
Up
Down
change to the previous working directory
Comments (13) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
^foo^bar
2009-01-26 13:25:37
User: root
375
Up
Down
Runs previous command but replacing
Really useful for when you have a typo in a previous command. Also, arguments default to empty so if you accidentally run:
echo "no typozs"
you can correct it with
^z
Comments (5) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
mtr google.com
2009-02-21 07:53:32
User: fryfrog
354
Up
Down
mtr, better than traceroute and ping combined
mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.
As mtr starts, it investigates the network connection between the host mtr runs on and HOSTNAME. by sending packets with purposly low TTLs. It continues to send packets with low TTL, noting the response time of the intervening routers. This allows mtr to print the response percentage and response times of the internet route to HOSTNAME. A sudden increase in packetloss or response time is often an indication of a bad (or simply over‐loaded) link.
Show sample output | Comments (11) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
cp filename{,.bak}
2009-02-05 17:12:03
User: elofland
Functions: cp
351
Up
Down
quickly backup or copy a file with bash
Comments (13) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
ctrl-x e
2009-03-11 09:26:05
User: fool
323
Up
Down
Rapidly invoke an editor to write a long, complex, or tricky command
Next time you are using your shell, try typing ctrl-x e (that is holding control key press x and then e). The shell will take what you've written on the command line thus far and paste it into the editor specified by $EDITOR. Then you can edit at leisure using all the powerful macros and commands of vi, emacs, nano, or whatever.
Show sample output | Comments (14) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
<space>command
2009-03-17 16:25:29
User: eaZy
278
Up
Down
Execute a command without saving it in the history
Prepending one or more spaces to your command won't be saved in history.
Useful for pr0n or passwords on the commandline.
Tested on BASH.
Show sample output | Comments (11) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
$ssh-copy-id user@host
2009-02-07 04:58:11
User: senthil
266
Up
Down
Copy ssh keys to user@host to enable password-less ssh logins.
To generate the keys use the command ssh-keygen
Comments (14) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
> file.txt
2009-01-26 10:22:31
User: root
259
Up
Down
Empty a file
For when you want to flush all content from a file without removing it (hat-tip to Marc Kilgus).
Comments (16) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
reset
2009-01-28 22:22:01
User: root
Functions: reset
213
Up
Down
Salvage a borked terminal
If you bork your terminal by sending binary data to STDOUT or similar, you can get your terminal back using this command rather than killing and restarting the session. Note that you often won't be able to see the characters as you type them.
Show sample output | Comments (11) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
2009-02-05 17:23:43
User: wwest4
204
Up
Down
Capture video of a linux desktop
Comments (14) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
'ALT+.' or '<ESC> .'
2009-03-20 11:36:04
User: atoponce
181
Up
Down
Place the argument of the most recent command on the shell
When typing out long arguments, such as:
cp file.txt /var/www/wp-content/uploads/2009/03/
You can put that argument on your command line by holding down the ALT key and pressing the period '.' or by pressing <ESC> then the period '.'. For example:
cd 'ALT+.'
would put '/var/www/wp-content/uploads/2009/03/ as my argument. Keeping pressing 'ALT+.' to cycle through arguments of your commands starting from most recent to oldest. This can save a ton of typing.
Comments (9) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
mount | column -t
2009-03-20 14:18:56
User: thechile
Functions: column mount
Tags: Filesystem mount column
180
Up
Down
currently mounted filesystems in nice layout
Particularly useful if you're mounting different drives, using the following command will allow you to see all the filesystems currently mounted on your computer and their respective specs with the added benefit of nice formatting.
Show sample output | Comments (5) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
ssh -N -L2001:localhost:80 somemachine
2009-02-05 09:13:23
User: mischamolhoek
Functions: ssh
170
Up
Down
start a tunnel from some machine's port 80 to your local post 2001
now you can acces the website by going to http://localhost:2001/
Comments (8) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
echo "ls -l" | at midnight
2009-01-25 21:07:42
User: root
Functions: at echo
166
Up
Down
Execute a command at a given time
This is an alternative to cron which allows a one-off task to be scheduled for a certain time.
Comments (11) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
dig +short txt <keyword>.wp.dg.cx
2009-07-31 16:08:59
User: drizzt
Functions: dig
Tags: dig txt record wikipedia dns
163
Up
Down
Query Wikipedia via console over DNS
Query Wikipedia by issuing a DNS query for a TXT record. The TXT record will also include a short URL to the complete corresponding Wikipedia entry.You can also write a little shell script like:
$ cat wikisole.sh
#!/bin/sh
dig +short txt ${1}.wp.dg.cx
and run it like
./wikisole.sh unix
were your first option ($1) will be used as search term.
Show sample output | Comments (23) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
netstat -tlnp
2009-02-15 14:20:25
User: fulat2k
Functions: netstat
156
Up
Down
Lists all listening ports together with the PID of the associated process
The PID will only be printed if you're holding a root equivalent ID.
Comments (8) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp
2009-02-08 10:10:00
User: morpheus
Functions: dd ssh
150
Up
Down
output your microphone to a remote computer's speaker
This will output the sound from your microphone port to the ssh target computer's speaker port. The sound quality is very bad, so you will hear a lot of hissing.
Comments (16) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
curl -u user:pass -d status="Tweeting from the shell" http://twitter.com/statuses/update.xml
2009-02-05 18:33:23
User: adamm9
149
Up
Down
Update twitter via curl
Comments (19) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
mount -t tmpfs tmpfs /mnt -o size=1024m
2009-02-06 00:33:08
User: ajrobinson
Functions: mount
143
Up
Down
Mount a temporary ram partition
Makes a partition in ram which is useful if you need a temporary working space as read/write access is fast.
Be aware that anything saved in this partition will be gone after your computer is turned off.
Comments (6) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
!!:gs/foo/bar
2009-02-11 10:20:15
User: Tronks
142
Up
Down
Runs previous command replacing foo by bar every time that foo appears
Very useful for rerunning a long command changing some arguments globally.
As opposed to ^foo^bar, which only replaces the first occurrence of foo, this one changes every occurrence.
Comments (6) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
sshfs name@server:/path/to/folder /path/to/mount/point
2009-02-05 20:17:41
User: ihasn
141
Up
Down
Mount folder/filesystem through SSH
Install SSHFS from http://fuse.sourceforge.net/sshfs.html
Will allow you to mount a folder security over a network.
Show sample output | Comments (6) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
man ascii
2009-03-31 10:29:20
User: ntheother
Functions: man
139
Up
Down
Quick access to the ascii table.
Comments (2) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
2009-01-26 10:26:48
User: root
801
Up
Down
Run the last command as root
Useful when you forget to use sudo for a command. "!!" grabs the last run command.
Comments (30) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
python -m SimpleHTTPServer
2009-02-05 11:57:43
User: pixelbeat
Functions: python
608
Up
Down
Serve current directory tree at http://$HOSTNAME:8000/
Comments (21) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
:w !sudo tee %
2009-02-25 16:27:24
User: skinp
Functions: tee
Tags: vim sudo tee
573
Up
Down
Save a file you edited in vim without the needed permissions
I often forget to sudo before editing a file I don't have write permissions on. When you come to save that file and get the infamous "E212: Can't open file for writing", just issue that vim command in order to save the file without the need to save it to a temp file and then copy it back again.
Comments (26) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
cd -
2009-02-04 22:41:21
User: systemj
Functions: cd
481
Up
Down
change to the previous working directory
Comments (13) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
^foo^bar
2009-01-26 13:25:37
User: root
375
Up
Down
Runs previous command but replacing
Really useful for when you have a typo in a previous command. Also, arguments default to empty so if you accidentally run:
echo "no typozs"
you can correct it with
^z
Comments (5) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
mtr google.com
2009-02-21 07:53:32
User: fryfrog
354
Up
Down
mtr, better than traceroute and ping combined
mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.
As mtr starts, it investigates the network connection between the host mtr runs on and HOSTNAME. by sending packets with purposly low TTLs. It continues to send packets with low TTL, noting the response time of the intervening routers. This allows mtr to print the response percentage and response times of the internet route to HOSTNAME. A sudden increase in packetloss or response time is often an indication of a bad (or simply over‐loaded) link.
Show sample output | Comments (11) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
cp filename{,.bak}
2009-02-05 17:12:03
User: elofland
Functions: cp
351
Up
Down
quickly backup or copy a file with bash
Comments (13) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
ctrl-x e
2009-03-11 09:26:05
User: fool
323
Up
Down
Rapidly invoke an editor to write a long, complex, or tricky command
Next time you are using your shell, try typing ctrl-x e (that is holding control key press x and then e). The shell will take what you've written on the command line thus far and paste it into the editor specified by $EDITOR. Then you can edit at leisure using all the powerful macros and commands of vi, emacs, nano, or whatever.
Show sample output | Comments (14) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
<space>command
2009-03-17 16:25:29
User: eaZy
278
Up
Down
Execute a command without saving it in the history
Prepending one or more spaces to your command won't be saved in history.
Useful for pr0n or passwords on the commandline.
Tested on BASH.
Show sample output | Comments (11) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
$ssh-copy-id user@host
2009-02-07 04:58:11
User: senthil
266
Up
Down
Copy ssh keys to user@host to enable password-less ssh logins.
To generate the keys use the command ssh-keygen
Comments (14) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
> file.txt
2009-01-26 10:22:31
User: root
259
Up
Down
Empty a file
For when you want to flush all content from a file without removing it (hat-tip to Marc Kilgus).
Comments (16) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
reset
2009-01-28 22:22:01
User: root
Functions: reset
213
Up
Down
Salvage a borked terminal
If you bork your terminal by sending binary data to STDOUT or similar, you can get your terminal back using this command rather than killing and restarting the session. Note that you often won't be able to see the characters as you type them.
Show sample output | Comments (11) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
2009-02-05 17:23:43
User: wwest4
204
Up
Down
Capture video of a linux desktop
Comments (14) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
'ALT+.' or '<ESC> .'
2009-03-20 11:36:04
User: atoponce
181
Up
Down
Place the argument of the most recent command on the shell
When typing out long arguments, such as:
cp file.txt /var/www/wp-content/uploads/2009/03/
You can put that argument on your command line by holding down the ALT key and pressing the period '.' or by pressing <ESC> then the period '.'. For example:
cd 'ALT+.'
would put '/var/www/wp-content/uploads/2009/03/ as my argument. Keeping pressing 'ALT+.' to cycle through arguments of your commands starting from most recent to oldest. This can save a ton of typing.
Comments (9) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
mount | column -t
2009-03-20 14:18:56
User: thechile
Functions: column mount
Tags: Filesystem mount column
180
Up
Down
currently mounted filesystems in nice layout
Particularly useful if you're mounting different drives, using the following command will allow you to see all the filesystems currently mounted on your computer and their respective specs with the added benefit of nice formatting.
Show sample output | Comments (5) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
ssh -N -L2001:localhost:80 somemachine
2009-02-05 09:13:23
User: mischamolhoek
Functions: ssh
170
Up
Down
start a tunnel from some machine's port 80 to your local post 2001
now you can acces the website by going to http://localhost:2001/
Comments (8) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
echo "ls -l" | at midnight
2009-01-25 21:07:42
User: root
Functions: at echo
166
Up
Down
Execute a command at a given time
This is an alternative to cron which allows a one-off task to be scheduled for a certain time.
Comments (11) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
dig +short txt <keyword>.wp.dg.cx
2009-07-31 16:08:59
User: drizzt
Functions: dig
Tags: dig txt record wikipedia dns
163
Up
Down
Query Wikipedia via console over DNS
Query Wikipedia by issuing a DNS query for a TXT record. The TXT record will also include a short URL to the complete corresponding Wikipedia entry.You can also write a little shell script like:
$ cat wikisole.sh
#!/bin/sh
dig +short txt ${1}.wp.dg.cx
and run it like
./wikisole.sh unix
were your first option ($1) will be used as search term.
Show sample output | Comments (23) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
netstat -tlnp
2009-02-15 14:20:25
User: fulat2k
Functions: netstat
156
Up
Down
Lists all listening ports together with the PID of the associated process
The PID will only be printed if you're holding a root equivalent ID.
Comments (8) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp
2009-02-08 10:10:00
User: morpheus
Functions: dd ssh
150
Up
Down
output your microphone to a remote computer's speaker
This will output the sound from your microphone port to the ssh target computer's speaker port. The sound quality is very bad, so you will hear a lot of hissing.
Comments (16) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
curl -u user:pass -d status="Tweeting from the shell" http://twitter.com/statuses/update.xml
2009-02-05 18:33:23
User: adamm9
149
Up
Down
Update twitter via curl
Comments (19) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
mount -t tmpfs tmpfs /mnt -o size=1024m
2009-02-06 00:33:08
User: ajrobinson
Functions: mount
143
Up
Down
Mount a temporary ram partition
Makes a partition in ram which is useful if you need a temporary working space as read/write access is fast.
Be aware that anything saved in this partition will be gone after your computer is turned off.
Comments (6) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
!!:gs/foo/bar
2009-02-11 10:20:15
User: Tronks
142
Up
Down
Runs previous command replacing foo by bar every time that foo appears
Very useful for rerunning a long command changing some arguments globally.
As opposed to ^foo^bar, which only replaces the first occurrence of foo, this one changes every occurrence.
Comments (6) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
sshfs name@server:/path/to/folder /path/to/mount/point
2009-02-05 20:17:41
User: ihasn
141
Up
Down
Mount folder/filesystem through SSH
Install SSHFS from http://fuse.sourceforge.net/sshfs.html
Will allow you to mount a folder security over a network.
Show sample output | Comments (6) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
man ascii
2009-03-31 10:29:20
User: ntheother
Functions: man
139
Up
Down
Quick access to the ascii table.
Comments (2) | Add to favourites | Report as malicious | Submit alternative | Report as a duplicate
发表评论
-
vim复制代码包含注释时格式会乱掉(转)
2013-07-16 10:47 3513乱码问题 一般来说只需要正确设置vim的编码识别序列就很少会遇 ... -
批量替换文件后缀名
2012-10-22 22:49 775for j in *.aga; do echo ` mv $j ... -
路由相关的的一些东西
2012-10-03 11:01 1066熟悉使用ifconfig 会非常方便。 if ... -
ubuntu脚本有区别rename和bash
2012-09-30 11:25 6323在ubuntu上写法有区别 使用 #!/bin/bash代替# ... -
itop
2012-06-26 23:06 1459Linux下中断来源可以从 /proc/interrupts ... -
telnet发邮件
2012-06-26 23:05 1751参考。http://forum.ubuntu.org.cn/v ... -
vim折叠和vim相关
2011-12-03 11:16 1226http://blog.csdn.net/namecyf/ar ... -
sed常用
2011-11-21 10:37 1522转http://blog.chinaunix.net/sp ... -
vim常用参数
2011-11-21 09:46 875cat - aa.txt >bb.txt cat -v ... -
awk的helloworld
2011-11-18 17:08 947两次过滤 awk -F '"' '{print $2 ... -
Print without executing the last command that starts with
2011-11-10 14:24 1004Print without executing the las ... -
shell的function
2011-10-24 10:22 1137#!/bin/sh #/bin/sh hello(){ ... -
(转)查看网卡流量shell脚本工具
2011-10-19 10:10 945http://www.mysqlops.com/2011/10 ... -
看错误号的定义
2011-09-22 09:14 955perl -MPOSIX -e 'print strerror ... -
diff和patch
2011-09-08 23:31 1021网上找的,摘抄 diff和patch是一对工具,在数学上来说, ... -
mkfifo 和nc
2011-08-25 00:00 1690服务器端 nc -l 1234 客户端 nc 10.10.10 ... -
linux date时间戳互相转换
2011-08-17 15:15 400631.查看指定时间的时间戳 查看当前时间 #date + ... -
linux修改主机名
2011-07-21 09:32 1087转http://hi.baidu.com/sunshibing ... -
转unix文本格式转换
2011-07-20 09:33 2090转http://wly719.iteye.com/blog/5 ... -
sed&& awk
2011-07-18 21:02 1085http://www.reddragonfly.org/abs ...
相关推荐
以下是一些常用Shell命令的详细说明: 1. `cat`:用于查看和组合文件内容。`-b`选项会在非空行上显示行号,`-E`会在每行末尾显示'$',`-T`会将制表符转换为'^I'。 2. `chmod`:改变文件或目录的访问权限。`who`...
以下是针对文件和目录操作的一些常用shell命令及其使用说明。 一、文件目录类命令 1. 查看联机帮助信息 使用man命令可以查看系统中任何命令的帮助信息,例如: # man ls 2. 列出当前目录或指定目录的文件名和目录...
以下是一些常用Shell命令的详细说明: 1. **basename**: `basename` 命令用于从路径中提取文件的基本名称,忽略任何路径分隔符和扩展名。例如,`basename /home/user/documents/report.txt` 将返回 "report"。 2...
本文将详细介绍一些常用的 shell 命令,包括系统资源监测命令 sar、正则表达式、文件处理命令 awk 等。 系统资源监测命令 sar sar 命令是用来收集系统统计信息的标准 UNIX 命令,sar 命令的选项很多,可以提供队列...
下面将详细介绍Shell编程的基础知识以及一些常用的Shell命令。 **一、Shell脚本基础** 1. **Shebang**:脚本开头的`#!/bin/bash`声明了使用哪个Shell解析脚本,这里使用的是Bash Shell,是目前最常用的Shell。 2. *...
下面是 HDFS 的一些常用 shell 命令: 1. hadoop fs -mkdir <dir>:创建一个新的目录。 2. hadoop fs -rm <file>:删除一个文件。 3. hadoop fs -cp <src> <dst>:复制文件或目录。 4. hadoop fs -mv <src> <dst>:...
以上是对"linux常用shell脚本"中涉及的一些关键知识点的概述。通过学习和实践这些内容,运维人员能够更高效地管理系统,自动化日常任务。在实际工作中,还可以结合具体的脚本及配置文件进一步了解和掌握各种实用技巧...
这个压缩包文件“常用shell脚本源码”显然包含了若干个可以用于日常任务的预编写脚本,这些脚本可以帮助用户自动化重复性工作,提高效率。下面我们将深入探讨shell脚本的一些核心知识点。 1. **基础语法**: - ...
### Linux常用Shell命令详解 #### 一、基本命令 **1. 重启与关机** - **立即重启:** - `shutdown -r now` - `reboot` - **立即关机:** - `shutdown -h now` - `poweroff` - **定时重启(2分钟后):** -...
在开发ARM Linux时,掌握一系列常用的shell命令对于提高开发效率和维护系统的便捷性有着至关重要的作用。本文档将列举一系列在ARM Linux开发中常用的shell命令,以便开发者能快速查找并使用它们来执行各种任务。 ...
shell脚本
以下将详细介绍Linux操作系统中的一些常用Shell命令以及它们的使用方法和技巧。 首先,Shell命令基础部分讲述了Shell的作用和命令的基本格式。Shell作为Linux操作系统的用户界面,允许用户通过输入命令来控制计算机...
Unix 命令是 DBA 的基本工具,以下是一些常用的 Unix 命令: * ps -- 显示进程 * grep -- 搜索文件中的某种文本模式 * mailx -- 读取或者发送 mail * cat -- 连接文件或者显示它们 * cut -- 选择显示的列 * awk --...
4. **脚本和批处理文件**:一些预先编写好的Shell脚本,可以自动执行一系列命令,提高工作效率。 5. **文档**:可能包含关于如何使用这些工具的说明或参考指南,这对于初学者尤其有用。 使用EFI Shell工具包时,...
以下是一些常用的Bash命令: 1. **ls**:列出目录内容。 2. **cd**:切换当前工作目录。 3. **mv**:移动或重命名文件和目录。 4. **cp**:复制文件和目录。 5. **rm**:删除文件和目录(谨慎使用,删除操作不可逆)...
以上就是一些常用的Shell命令介绍。熟练掌握这些命令,能够显著提高我们在Linux环境下的工作效率。此外,对于命令中的选项(如 `-l`, `-a` 等),建议查阅官方文档或使用 `man` 命令获取更详细的说明。
本篇文章将深入探讨shell脚本的基础知识,包括基本语法、变量、条件语句、循环结构、函数以及一些实用的内置命令。 首先,让我们了解什么是Shell。Shell是操作系统提供的一种命令解释器,用户可以通过Shell与系统...
### Hadoop2安装与常用Shell命令详解 #### Hadoop2安装步骤 在开始Hadoop2的安装之前,首先需要确保所有节点的操作系统版本为CentOS/Red Hat Linux 6.4_x64,并且每台服务器都已完成基本的系统配置。 ##### 系统...
总结,"linux-一些常用的shell脚本用于webserver的服务安装线上代码发布推送等"提供了宝贵的资源,不仅能够帮助我们自动化日常运维任务,提高工作效率,还能作为学习和提升Linux技能的有效途径。通过深入理解和应用...