Questions tagged [command-switch]

Command Switch or Flag or Option are typed at the prompt as part of a command which are meant to execute the requirement.

Filter by
Sorted by
Tagged with
0 votes
1 answer
89 views

How to handle switch without argument?

I wrote a simple bash script for some USB webcam image settings and restarting of the webcamd service. At this moment, when someone uses the -t flag, they can use only "n" or "d", ...
user avatar
  • 13
2 votes
1 answer
72 views

How do you interpret this complicated man page syntax?

I am reading this on a man page: [-n number-to-stat[:max-size[:min-size][:num-directories[:chunk-size]]]] I interpret this as -n is optional but how do I specify the num-directories? Preferably I ...
user avatar
  • 2,012
-1 votes
2 answers
47 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 ...
user avatar
  • 109
2 votes
1 answer
2k views

What are the differences between command options and switches?

From Java in a Nutshell: The syntax of the jar command is intentionally very similar to that of the Unix tar command. This similarity is the reason why jar uses command options, rather ...
user avatar
  • 90.6k
2 votes
0 answers
147 views

How to detect, which of features binded on hot-keys Ctrl+Shift in Gnome?

Kali 2016.2 in Qemu: /usr/bin/qemu-system-x86_64 -boot d -m 5000 --enable-kvm -cdrom kali-linux-2016.2-amd64.iso I'm trying to bind switcher to Russian Language in Gnome: dconf: /usr/bin/dconf ...
user avatar
4 votes
2 answers
289 views

When compiling, can I use a file for ./configure options?

Building some software from source and there are a lot of configure switches. ./configure --enable-ftp --with-gettext ... I have all the switches I want in a text file separated by new lines, e.g.:...
user avatar
  • 1,997
1 vote
2 answers
124 views

bzip2 -c versus -z

Wanted to check for understanding; while revisiting the topic of using dd over netcat I experimented with compressing the data with bzip2. In the man page, there's -c (compress or decompress to ...
user avatar
1 vote
1 answer
9k views

List of 'if' switches anywhere? [closed]

Is there a list of all the if switches for use in bash scripting? Sometimes I see someone using it and I wonder what the switch they're using actually does. Example is the -z in this one. I know how ...
user avatar
48 votes
3 answers
35k views

tree command for multiple includes and excludes

Could you please give me an example of using the tree command to filter out result as follows: to ignore directories (say bin, unitTest) only listing certain files having extensions (say .cpp, .c, ....
user avatar
  • 481
14 votes
5 answers
14k views

grep how to suppress display of non-matched file?

I am trying to find files containing a specific word using grep. There are many files in the directory (> 500) Command I run $ grep 'delete' * Output validate_data_stage1:0 validate_data_stage2:0 ...
user avatar
  • 24.4k
7 votes
3 answers
7k views

Passing SSH options to git-clone

I connect to my server using SSH: ssh user@server -p 2224 -zZ abcd I also have a git repository on my server. The only way I know to clone is: git clone ssh://user@server.com:2224/path/to/repo ...
user avatar
  • 2,244
15 votes
2 answers
9k views

Is '-9' a flag to kill command?

What does -9 do? It does not show up in the syntax: $ kill kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] $
user avatar
  • 33k