All Questions
34
questions
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 ...
0
votes
1
answer
439
views
getopt and case function not executing
I encountered such a problem when passing a parameter to a script, the function corresponding to the case menu is not executed. The script accepts parameters as input and performs the appropriate ...
0
votes
1
answer
80
views
What does '-' mean in a Shell script?
I'm trying to understand a script I have and it has a line that says
cut -d '-' -f 1
I don't understand what '-' does here
7
votes
1
answer
971
views
What is correct or suggested approach to send the signal name through 'kill' command?
I read many tutorials about the use of kill command, mostly 3 approaches
kill -15 <pid>
kill -SIGTERM <pid>
kill -TERM <pid>
For scripts purposes and for portability with macos too, ...
4
votes
3
answers
2k
views
Why are the signal lists for kill, killall and pkill not the same?
I researched the kill, pkill and killall commands, and I understood most of their differences. However, I am confused about their signals:
If I run kill -l, I see:
1) SIGHUP 2) SIGINT 3) ...
4
votes
2
answers
457
views
What does '-P' mean in the context of the 'ps' command?
If is executed ps -p 3384 3395 (observe -p is lowercase) then the output is as follows:
PID TTY STAT TIME COMMAND
3384 tty6 S+ 0:00 man ls
3395 tty6 S+ 0:00 pager
Until ...
2
votes
1
answer
876
views
How does -m option work in sort command?
As sort's man page says:
-m, --merge
merge already sorted files; do not sort
Here are my two simple text files and the result of sort command with -m option:
soroush@pop-os:~/Desktop$ cat a_file....
-2
votes
1
answer
75
views
What does pr -m -t means?
What does pr -m -t mean? I managed to find out that -t suppresses headers and footers. What does -m mean specifically?
-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
0
votes
1
answer
145
views
What are really the prefix rules for options: - and -- ? Why is the find command not compatible with the --name option? [duplicate]
Once, I've learned that options of Linux commands came in two manners:
those of one letter, prefixed by a -
those of many letters, prefixed by a --
And this works in 95% of the cases.
But not, for ...
0
votes
1
answer
1k
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 ...
5
votes
1
answer
6k
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
1
answer
292
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 ...
2
votes
1
answer
2k
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
2
answers
3k
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