在写命令的时候经常见到别人写 "-" 请问那个"-" 是什么意思呢?

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
excalibur
帖子: 22
注册时间: 2009-05-30 19:19

在写命令的时候经常见到别人写 "-" 请问那个"-" 是什么意思呢?

#1

帖子 excalibur » 2009-09-01 18:29

如题 谢谢
哇吓吓吓吓...
头像
O_O_BOT
帖子: 2461
注册时间: 2009-05-20 19:32

Re: 在写命令的时候经常见到别人写 "-" 请问那个"-" 是什么意思呢?

#2

帖子 O_O_BOT » 2009-09-01 19:19

STDIN or STDOUT
irc 聊天室
ubuntu-cn 的irc 频道为
irc.ubuntu.com 8001 #ubuntu-cn
UTF8编码 可用 irssi xchat pidgin weechat 登录

http://webchat.freenode.net/?channels=ubuntu-cn
[url]irc://irc.freenode.net/ubuntu-cn[/url]
tusooa
帖子: 6548
注册时间: 2008-10-31 22:12
系统: 践兔
联系:

Re: 在写命令的时候经常见到别人写 "-" 请问那个"-" 是什么意思呢?

#3

帖子 tusooa » 2009-09-10 19:00

代码: 全选

tar -cf -  ~/backup | tar -xf - -C ~/.bak/20090910/
      Stdin                Stdout

代码: 全选

] ls -ld //
t3swing
帖子: 1028
注册时间: 2008-11-01 21:42
来自: 树下板凳

Re: 在写命令的时候经常见到别人写 "-" 请问那个"-" 是什么意思呢?

#4

帖子 t3swing » 2009-09-15 15:09

ls能给点资料链接不 ? - 这个东西不好搜索啊
民族的脊梁,是踏实做事的人,非只知道骂街的泼妇。
tusooa
帖子: 6548
注册时间: 2008-10-31 22:12
系统: 践兔
联系:

Re: 在写命令的时候经常见到别人写 "-" 请问那个"-" 是什么意思呢?

#5

帖子 tusooa » 2009-09-30 21:58

>> lzma --help
Usage: lzma [OPTION]... [FILE]...
Compress or decompress FILEs in the .xz format.

Mandatory arguments to long options are mandatory for short options too.

-z, --compress force compression
-d, --decompress force decompression
-t, --test test compressed file integrity
-l, --list list information about files
-k, --keep keep (don't delete) input files
-f, --force force overwrite of output file and (de)compress links
-c, --stdout write to standard output and don't delete input files
-0 .. -9 compression preset; 0-2 fast compression, 3-5 good
compression, 6-9 excellent compression; default is 6
-e, --extreme use more CPU time when encoding to increase compression
ratio without increasing memory usage of the decoder
-q, --quiet suppress warnings; specify twice to suppress errors too
-v, --verbose be verbose; specify twice for even more verbose
-h, --help display this short help
-H, --long-help display the long help (lists also the advanced options)
-V, --version display the version number

With no FILE, or when FILE is -, read standard input.

Report bugs to <[email protected]> (in English or Finnish).
XZ Utils home page: <http://tukaani.org/xz/>

代码: 全选

] ls -ld //
回复