Say,我想重提一个tmp/ d。
在气体(如泡沫)中,我可以<代码>护堤/-fr或<代码>-fr tmp/。 但是,在mac中,我只能读到<代码>rm -fr tmp/
。
是否有办法混淆马壳(bash/zsh/...),因此,我可以使用象牙齿一样的指挥风格:rm tmp/ -fr
?
Say,我想重提一个tmp/ d。
在气体(如泡沫)中,我可以<代码>护堤/-fr或<代码>-fr tmp/。 但是,在mac中,我只能读到<代码>rm -fr tmp/
。
是否有办法混淆马壳(bash/zsh/...),因此,我可以使用象牙齿一样的指挥风格:rm tmp/ -fr
?
操作后如<条形码>温度波/-fr选择不合乎标准。 http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap12.html#tag_12_02”rel=“nofollow”
Guideline 9: All options should precede operands on the command line.
The implementors of the GNU utilities (as used by most Linux distributions) have chosen to add many non-standard extensions. While sometimes convenient, using these extionsions is inherently unportable. MacOS X has a userland derived from BSD, which does not have most of the non-standard GNU extensions. If you expect to be working with non-GNU systems such as BSD, Solaris or any other commercial UNIX in the future, it really pays to stick to standard syntax of utilities and not get used to any GNU extensions. It saves a lot of hassle when working with all the different UNIX operating systems out there. This is especially true and important when writing scripts. Relying on GNU syntax in scripts will make them unportable.
因此,我的建议不是在MacOS X上安装GNU核心用途,而是将其用作标准合成物的机会(IEEE Std 1003.1, POSIX.2等)。
这取决于你使用的指挥。 第十期顾问来自BSD家庭(通过NeXTSTEP),因此他们的标准公用事业大多来自BSD。 BSD和Ltino风格的指挥之间有很大的兼容性,但每次在你处理像这样的具体执行事项时都会如此。 如果你真的希望使用该指挥系统的无赖状态版本,你就可以安装全球团结联盟的核心用途包。 可查阅Homebrew (recommted)和MacPorts。 总的来说,由于点名冲突以及冲突,在BSD工具链中建造的GNU核心功用的安装工作十分困难。
总的来说,这将取决于执行你所执行的指挥。 但是,作为<代码>rm(如: rel=“nofollow”>rm),因为你以这个例子为例,无法使用。 至少不会做你认为的事情。
rm -fr tmp/
: will delete directory tmp/
with the options -r
and -f
, so recursive (here mandatory) and forced.rm tmp/ -fr
: will (attempt) to delete directory tmp/
and/or a file/directory
named -fr
, but would produce an error: rm: tmp/ directory
.I need to create a simple fixed width text file in KornShell (ksh). My current attempt using printf to pad the string isn t working out very well. What s the shortest, cleanest way to create a fixed ...
how to use the find command to find files/directories which are not matching the pattern. for eg: find <some options > -name "dontfile.txt" should give me output of all the find whose file ...
I need to put the contents of all *.as files in some specified folder into one big file. How can I do it in Linux shell?
How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks
The == operator is used to compare two strings in shell script. However, I want to compare two strings ignoring case, how can it be done? Is there any standard command for this?
I like to write bash shell scripts on my iPhone, put them in an app folder with an icon, plist, etc., so they execute like apps by tapping their icon on SpringBoard. This is not interactive like ...
Whenever I start a shell in vim using :sh, it doesn t source my ~/.bashrc file. How can I get it to do this automatically?
在Windows XP中,没有一时出现指挥时,是否有办法操作一种灰色文字? 我常常需要把“善待”(工作)与“灰色”同起来,即使我的文字没有产出,......