Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
48 views

What is the difference between quotes wrap around only the option value vs quotes wrap around the option name and option value?

What is the difference between quotes wrap around only the option value eg: grep --file="grep pattern file.txt" * vs quotes wrap around the option name and option value eg: grep "--...
Nor.Z's user avatar
  • 133
4 votes
2 answers
4k views

What precisely does cp -b (--backup) actually do?

Before you hit me with the obvious, I know, the backup option makes a backup of a file. But the thing is, the cp command in general backs up a file. One could argue a copy of a file is a backup. So ...
backslash enn's user avatar
0 votes
1 answer
93 views

less command: b/f vs w/s

About the less and according with: Less command Linux / Unix Colored Man Pages With less Command indicates the following: f ^F ^V SPACE * Forward one window (or N lines). b ^B ESC-v * Backward ...
Manuel Jordan's user avatar
5 votes
2 answers
837 views

less command g vs p option

In less for navigation purposes according with this tutorial Less Command in Linux indicates: g Go to the first line in the file. p Go to the beginning of the file. I tested both, and of course ...
Manuel Jordan's user avatar
0 votes
1 answer
688 views

ERROR: Unrecognized option: --host_jvm_args=-Xmx4g

OS: Linux Distrib: Debian GNU/Linux 10 (buster) bazel: v3.1.0 I try to get the memory limit to 4GB for bazel, but I get the error: ERROR: Unrecognized option: --host_jvm_args=-Xmx4g The whole ...
klor's user avatar
  • 414
1 vote
2 answers
81 views

What is the reasoning behind accepting truncated long command line options?

Many command line utilities accept long ("GNU style", according to [1]) options such as --version. To my surprise, truncated versions are often interpreted as the full option. For example, ...
Mårten W's user avatar
  • 119
-1 votes
1 answer
169 views

ls -l | cut -c1-11,50- Can Someone Explain the 2nd part after the pipe?

I have taken a course in that suddenly I saw this, I understood until the pipe but the options used after the pipe for the command cut are bit confusing
Matta Rithik Reddy's user avatar
0 votes
1 answer
63 views

How to specify boolean value in argument to external command?

The man page for txt2html says: --make_links Should we try to build links? If this is false, then the links dictionaries are not consulted and only structural text-to-HTML ...
Keith Bennett's user avatar
1 vote
1 answer
1k views

If no argument is given to mandatory option, zparseopts takes next option as the argument

I am using zsh 5.4.2. The function that is causing issue is: function zp () { zparseopts -E -watch:=o_watch -show=o_show echo "show : $o_show" echo "watch ...
Ahmad Ismail's user avatar
  • 2,738
1 vote
1 answer
1k views

How do I make an option (not argument of the option) mandatory in zparseopts?

In the example bellow: function zp () { zparseopts -E -walk:=o_walk echo "walk: $o_walk" } I get the following output: $ zp --walk "Walking" walk : --walk ...
Ahmad Ismail's user avatar
  • 2,738
0 votes
1 answer
1k views

find option as command line argument

I have got a problem with my script. I am trying to write a script, where option for command find is the first command line argument. In my script I've got something like find_option=$1 find $...
user402980's user avatar
37 votes
2 answers
9k views

Do command line options take an equals sign between option name and value?

Just using kubectl as an example, I note that kubectl run --image nginx ... and kubectl run --image=nginx ... both work. For command-line programs in general, is there a rule about whether an equals ...
Joshua Fox's user avatar
0 votes
2 answers
101 views

Stop executables and built-ins from interpreting a string argument starting with - as a switch? [duplicate]

Let's say I want to search a file for a string that begins with a dash, say "-something": grep "-something" filename.txt This throws an error, however, because grep and other executables, as well as ...
ErikE's user avatar
  • 129
-2 votes
2 answers
2k views

Command du -xh / | grep -P "G\t" explained?

I came across the command du -xh / | grep -P "G\t" I am interested in the switch -P of grep and what does it do. Also, can anyone explain what the "G\t" part does? Please do not ...
Miloš Stojanović's user avatar
2 votes
3 answers
1k views

On a Mac, how can I list contents of a non-current directory without showing backup files (ending with ~), preferably with BSD command ls?

My system: OS: MacOS / Mac OS X (Mojave 10.14.5) OS core: Darwin (18.6.0) Kernel: Darwin Kernel / XNU (18.6.0 / xnu-4903.261.4~2/RELEASE_X86_64) ls: version unknown, but man ls gives a page from the ...
zeroparallax's user avatar

15 30 50 per page