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

Questions tagged [options]

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

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
3 answers
151 views

Difference between -q and --quiet? [closed]

I was wondering: What is the difference between -q and --quiet? And in which case do I use -q and --quiet? Thank you!
Vroni Jane's user avatar
0 votes
1 answer
519 views

Add options with default value on shell script

I want to add some options to my custom shell script. I can show it to you since it is not top secret content :-P In my experience, there are two option types, set and unset options: set options are ...
Bruno Peixoto's user avatar
3 votes
1 answer
4k views

in bash the option "set -e" causes exit immediately, which is a problem in sourced scripts

When using bash in a terminal often scripts have to be run sourced. In such cases terminating the script must be done by "return", but not by "exit" in order to not kill the basic ...
Anton Wessel's user avatar
0 votes
1 answer
586 views

When is mandatory use the "--keep-newer-files" option for the tar command?

About the tar command Introduction Having for example: source numbers 001.txt # with the 111 content 002.txt # with the 222 content 003.txt # with the 333 content If is created the numbers.tar....
Manuel Jordan's user avatar
4 votes
1 answer
4k views

How to extract the tar.gz file but without overwriting existing files?

With the unzip -n /path/to/filename/filename.zip command the compressed file is uncompressed but does not overwrite existing files. This approach is useful when the same compressed file was ...
Manuel Jordan's user avatar
0 votes
1 answer
2k views

curl: (6) Could not resolve host: services.gradle.org

If in Ubuntu Server is executed: curl https://services.gradle.org/distributions/gradle-7.5.1-bin.zip -O appears: % Total % Received % Xferd Average Speed Time Time Time Current ...
Manuel Jordan's user avatar
0 votes
1 answer
1k views

Llist installed packages with their repository name, version, and architecture using zypper

zypper se -i shows installed packages, but unlike zypper pa the repo, arch, and version information is missing. Is there a command option that shows these bits?
user547462's user avatar
1 vote
1 answer
2k views

tar create: How to avoid to show the "tar: Removing leading `/' from member names" message in the terminal?

About the tar command If is executed the command: tar -czf numbers.tar.gz numbers The numbers.tar.gz file is created - from the numbers - in the current directory But for script purposes - by testing ...
Manuel Jordan's user avatar
0 votes
1 answer
2k views

Why tar command uses gzip command through 'z' option?

In Linux Ubuntu about the 'tar' command for these versions: tar -tzf /path/to/filename.tar.gz # Show the content tar -xzf /path/to/filename.tar.gz # Extract the content Observe both commands use ...
Manuel Jordan's user avatar
5 votes
1 answer
3k views

curl: when use "--no-progress-meter" over "-sS"?

About curl about to hide the Progress Meter I found many answers through Stack Exchange branches doing mention of -s and -S or simply -sS where -s hides the progress meter -S only shows error ...
Manuel Jordan's user avatar
7 votes
1 answer
8k views

curl: download file with the same name with "-O" but defining a specific path directory

With curl is possible do curl http://somedomain.com/originalfilename.tar.gz -o newfilename.tar.gz curl http://somedomain.com/originalfilename.tar.gz -o /other/path/newfilename.tar.gz Therefore with -...
Manuel Jordan's user avatar
0 votes
2 answers
204 views

Effect of slash (/) suffixes on symlink names for `ls` with the `-F` option

By way of example, I have a directory structure like this: $ \ls -F dir/ lnk@ $ \ls -F dir FILE $ \ls -l lnk lrwxrwxrwx 1 user group d Mon hh:mm lnk -> dir My ls command is aliased. I am using \...
Ana Nimbus's user avatar
0 votes
1 answer
340 views

Remove options from command

My inputs are commands followed by an unrestricted number of single-letter options, e.g. command -abc. Neither the command nor the options take any arguments. My goal is to remove certain options. ...
rewire's user avatar
  • 111
0 votes
1 answer
618 views

How does "-" work in the "ssh-keygen -lf -" command?

I read this question Get SSH server key fingerprint In the answer and solution appears the following command (adapted here for presentation purposes) ssh-keyscan 192.168.1.X | ssh-keygen -lf - I ...
Manuel Jordan's user avatar

15 30 50 per page
1
2
3 4 5
23