Questions tagged [options]

Passing options like -l or --word to commands, or parsing them in scripts.

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

How to provide uWSGI multiple static-map options through environment variable?

uWSGI manual on static files serving states that: You can specify multiple --static-map options, even for the same mountpoint. --static-map /images=/var/www/img --static-map /images=/var/www/img2 --...
1
vote
1answer
22 views

difference between 'usermod -aG' and 'usermod -G' options

I'm preparing for the LPIC-1, exam 102, and was wondering what is the difference between these two commands with respect to options -G and -aG: usermod -G projectA, projectB jsmith usermod -aG ...
1
vote
2answers
38 views

Aliasing grep in find's -exec option

I have these aliases in my ~/.bashrc alias grep='grep --color=auto -H' alias fgrep='fgrep --color=auto -H' alias egrep='egrep --color=auto -H' but they have no effect when I run find ... -exec grep .....
0
votes
1answer
38 views

Bash script selecting folder

I am trying to list all the directory latest modified folder first using select, but I am stuck. Let's say I have: Folder1 ThisIsAnotherDir Directory New Directory This IS not_Same Directory When I ...
0
votes
0answers
32 views

Bash script that accepts options given after arguments in command line

I have a bash script that accepts a number of optional flags and two required arguments. Currently, if the command line call is ~/script.sh -a -b arg1 arg2 it works just fine, but if the call is ~/...
11
votes
1answer
1k views

Why does position of -C matter in git commands?

The following works: git -C ~/dotfiles status But this fails: git status -C ~/dotfiles Why is this?
3
votes
1answer
33 views

Are some apt long options undocumented?

I cannot find documentation on some long, double-dash options of apt, upon which I stumbled with Bash's tab-completion. $ apt install --<TAB><TAB> --allow-change-held-packages --fix-...
0
votes
1answer
46 views

does it matter where flag appears in a command?

I have been using the following command to install the Expo CLI package: sudo npm install expo-cli --global The command above works successfully to install that package. However, I'm wondering if ...
3
votes
1answer
35 views

Can the Linux find -iname option take more the one pattern

Using the Linux find command -iname option, I want to find and move files that have many different extensions (.pdf, .doc, .xlx, .ppt). I know I can use multiple patterns with grep. But can that ...
4
votes
1answer
51 views

Bash Shell “noexec” Option Usage Purpose

-n noexec ; Read commands and check syntax but do not execute them. Can you give an example of when we will need "noexec" which is one of the Bash options? Can someone give me an example of ...
0
votes
1answer
48 views

-f option for rmdir

Short version: I am searching for a way to get the behaviour of the -f flag in rm when using rmdir. Long version: I am running a parallel process where every command must clean up its working ...
2
votes
1answer
133 views

Changing the mount options after a filesystem got mounted

Is it possible to change the mount options of a filesystem after it got mounted (i.e without remounting) ?
0
votes
1answer
50 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 ...
1
vote
1answer
38 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 ...
0
votes
1answer
37 views

What do these options on dpkg-divert and sed do as it relates to Nvidia package diversion?

I recently had to use this command as I got some error due to nvidia package diversion, but I don't exactly know how it is working: LC_MESSAGES=C dpkg-divert --list '*nvidia-340*' | sed -nre 's/^...
0
votes
1answer
61 views

What does the -fs flag do in the ln command?

came across this line in a code base today ln -fs /tmp/Cargo.lock . and I couldn't find the -fs argument anywhere in man ln. What does it do? P.S. The project runs this command inside of a docker ...
0
votes
0answers
11 views

What is the command line option to remove the LAME progress bar in my console?

I can see that an error/warning occurs when I'm using LAME, only the progress bar writes over it. I know there is something happening because it goes down by one line and messes up the display. I ...
0
votes
1answer
52 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 $...
3
votes
2answers
585 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 ...
50
votes
4answers
6k views

Where is the `--` (double dash) argument documented?

There are some utilities that accept a -- (double dash) as the signal for "end of options", required when a file name starts with a dash: $ echo "Hello World!" >-file $ cat -- -file Hello World! ...
0
votes
1answer
170 views

What does “-plow” option do in dpkg-reconfigure

I stumbled upon the following answer on Unix stackexchange, where the -plow option is used with dpkg-reconfigure, but I can't find anything about it in the dpkg or dpkg-reconfigure manpages: http://...
0
votes
2answers
85 views

What do letters for symlink options (-P -L -H) stand for?

I've summarized a list of commands that accepts symbolic link options according to SUSv4-2018ed: cd chgrp chown chmod cp find ln ls pax rm The full list also includes their defaults and other ...
0
votes
1answer
79 views

What does the parenthesis around a use flag means?

I want to build my curl with the quiche support. I have enabled the use flag in the package.use file, but it does not take effect. I noticed there are a pair of parenthesis around the use flag. What ...
0
votes
0answers
112 views

The printers and settings in `.cups/lpoptions` are not read by `lpstat -a`

I set my printers/setting in ~/.cups/lpoptions as follows, and it was working well and I could select among different printers: Default RICOH fit-to-page=true Resolution=1200 sides=two-sided-long-...
0
votes
0answers
16 views

Select an action with a key

I would like to have something like a dmenu. But I don't want to type and then press return to select an action but just select the action with a single key press. It should be a simple application ...
0
votes
1answer
66 views

What happened to the “-4” option for command line FTP?

It used to be that you could force command line FTP to use IPv4 like so: ftp -4 ftp.example.com However, at some point in the relatively recent past the "-4" (and for that matter, the "-6") option ...
0
votes
0answers
279 views

How ls -lh round off the actual sizes in human readable form?

I was using the command ls -lh to see the long list of files and their sizes in human readable form but i was unable to understand one thing that how the human readable form round off the actual sizes....
1
vote
1answer
232 views

What does “ln -t” do [duplicate]

What does ln -T do? I know the flag does not exist in the BSD version of ln, and it only exists in the GNU version, and I have read the documentation that it will make ln "treat LINK_NAME as a normal ...
-1
votes
2answers
201 views

-y in Linux for example dnf -y install samba [duplicate]

what does the -y mean in linux. this symbol is always used after a command for example dnf -y install httpd. Everywhere I have looked I cannot find a definite answer. Please help
2
votes
2answers
113 views

Does the order of command line options matter in Perl?

The following command works as expected: perl -lne 'print $1 if /install\(TARGETS (.*) RUNTIME DESTINATION bin\)/' CMakeLists.txt This one works as well: perl -nle 'print $1 if /install\(TARGETS (.*...
-1
votes
1answer
131 views

apt-get man page weird flag

I just looked up the man page of apt-get via man apt-get and it shows me a weird flag in the synopsis section. It's the first one. Each x is a capitalized/uncapitalized character. SYNOPSIS apt-...
0
votes
2answers
227 views

Understand -exec command? [duplicate]

This works find ./ -iname '*.c' -o -name '*.h' -o -name '*.l' -exec grep -irn test1 {} \; If I combine -exec with ls then it tells me that is improper option. #ls -exec touch {} \; ls: invalid ...
-2
votes
1answer
124 views

Difference between GNU tar's --transform and --xform options

What is the main difference between GNU tar --transform to --xform? From reading the GNU tar manual, I assume they might be the same and the latter is a "sugar syntax".
0
votes
1answer
40 views

aliasing command options

Is there any way to alias the options of a command? For instance, I often use the options -mindepth and -maxdepth with find, but these are quite long at 9 characters apiece, and don't have ...
1
vote
1answer
272 views

What is the use of n option in cut command?

I'm learning about the cut command. In the man page of cut, they show the -n option like: -n (ignored) But I didn't understand the usage of the n option or when we would use it. Can anyone ...
0
votes
2answers
178 views

correct order while combining different options of a command

I usually combine options together whenever there are more than one option to be used with respect to some command. For example , if i want to create an archive using tar i will write tar -cvf archive....
4
votes
1answer
217 views

Why xargs uses -t to enable verbose mode?

Most programs use -v to enable verbose mode. Why does the GNU xargs use -t to enable verbosity?
2
votes
2answers
483 views

What is the rationale for using -f in tar [duplicate]

From man tar: -f, --file ARCHIVE use archive file or device ARCHIVE Please consider: tar -zxvf myFile.tar.gz As far as I understand, z means "gzipped tarball", x means "extract", v means "...
2
votes
1answer
72 views

What does “mount -e <device>” do?

TL;DR: What does mount -e <device> do? Overview Over ssh, mount commands are being sent by software that I need to maintain. Twice, the mount commands use an -e option. I don't know what -e is ...
1
vote
2answers
3k views

What does grep -w do?

In here grep is used with the option -w. I did man grep and grep --help to try to find what the aforementioned option does. Neither output says anything about a -w option. What does that option do? ...
1
vote
2answers
33 views

Discard “access denied” stderr natively in find

Is there an option in find that allows me to suppress the error messages that I get from it trying to access directories for which I don't have access? I know I can just discard stderr, but it seems ...
2
votes
3answers
195 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 ...
0
votes
1answer
364 views

find command - how to ignore case in -path option?

when searching filename or dirname case-insensetively, we can use option -iname. but if I want to ignore case in -path option, what should I do? can I do it with only find command, without using ...
-1
votes
1answer
112 views

How can fragment packets -f/--mtu be usefull?

How can fragment packets -f/--mtu be usefull ? That is, say from a normal scan I get for a given IP and port range: 28/tcp filtered unknown no-response 29/tcp filtered msg-icp no-response 30/tcp ...
0
votes
1answer
310 views

How do I pass long-style command line options to a bash script using getopt?

I have this script that I have cobbled together from bits of lore I've gleaned from googling: #!/usr/bin/env bash usage() { declare -r script_name=$(basename "$0") echo """ Usage: "${...
2
votes
1answer
66 views

su: What does the hyphen with nothing immediately following it mean?

Written as if it were an option, e.g: > su - someuser Don’t the space breaks apart “-“ and “someuser”? I went through the manpage but didn’t notice an entry for it.
1
vote
1answer
671 views

How do I customize Nautilus / Caja file manager?

I'm using Caja and I miss several features that I had with Windows Explorer. I'm willing to tweak some configs or even develop code to get them but I wouldn't know where to start to collaborate... ...
4
votes
1answer
439 views

Why should I escape the semicolon with find?

I'm using bash on Debian. I have to write find -iname "*mp3" -exec cp {} /media/MP3Player/ \; escaping the final semicolon, or else I get an error.
6
votes
3answers
1k views

Portable way to invoke tar with a list of files from stdin

I want to create a .tgz from the content of a directory. I also want to strip the leading "./" from the tar'ed content. I had done this as follows: cd /path/to/files/ && find . -type f | cut -...
2
votes
0answers
446 views

How to pass options to ssh proxy command?

To collect some data from a bunch of hosts I use a bash script which calls scp in a loop. Most of these hosts are configured for ssh public key authentication. I may skip those which have no key ...

1
2 3 4 5