All Questions
106 questions
0
votes
0
answers
28
views
how to change error (std-err) color [duplicate]
Because standard error is a separate device in UNIX-like environments, and programs or shell scripts can redirect their errors to it, it would be logical to configure terminals (any displayer) to ...
1
vote
0
answers
325
views
Bash terminal lagging one input behind
After a recent update, I've noticed that working on any terminal for more than a few minutes causes a delay between inputting a keypress and seeing it reflected on the screen.
Specifically, if I were ...
0
votes
3
answers
80
views
How to match a pattern instead of a single letter/number using brackets?
I want exclude MSG, PDF and DOC from my path with shell parameter expension using brackets.
When I place MSG between brackets only deletes the M instead of MSG. I looked around on the internet and ...
0
votes
2
answers
170
views
In terminal, how to delete a word when cursor is within the word?
I want to achieve functionality similar to c + a + w or d + a + w in vim
In terminal we have Ctrl + w for delete a word in the left and Alt + Backspace from the right But I was not able to find a ...
0
votes
0
answers
391
views
Open GUI linux terminal in non-interactive mode
It would be helpful if I can open a terminal and run commands exactly as if they would be run by a non-interactive bash script, to test whether certain commands work in non-interactive mode without ...
0
votes
1
answer
283
views
Is listing files with ls dangerous as stated on gnu.org documentation?
Is listing files with ls dangerous?
If I run just ls command in a directory with unknown files, can something bad happen?
Can you show me examples how running ls command is dangerous as stated in this ...
1
vote
1
answer
50
views
file not found when executed but exec bit set and accessible by other commands
On my system I'm puzzled by a behaviour I cannot understand: Previously I did install an SDK in my user-local binary path and all the files are there. However bash returns "file not found" ...
2
votes
3
answers
1k
views
Why command color disappears when I switch user?
I am current logged-in as portait through GUI login. Whenever I typed any command in terminal it is displayed in blue color but when I switch user sudo su ramuG and typed any command in terminal it ...
0
votes
0
answers
70
views
How can I run alias permanently in a normal way?
I have created an alias and appended to ~/.bashrc:
echo "alias mydir='cd /home/agochar/Desktop/folder'">>~/.bashrc
When I tried to run it like: mydir it says: Command 'mydir' not ...
0
votes
1
answer
243
views
Using sort and/or uniq functions to launch a program
I'm doing a challenge in which you are supposed to exploit a vulnerability in a program.
This one in specific seems to require the usage of sort and/or uniq to be able to launch a program.
However, I ...
0
votes
1
answer
272
views
How to source from stdout for both Linux and MacOS?
On Linux I can do:
source <(cat .env | grep ANDROID_GRADLE_TASK)
But on MacOS, this doesn't do anything (no error, and no source)
I have tried to replace -di with --decode --input, it didn't help.
...
1
vote
1
answer
543
views
How can I change terminal branch color?
My terminal has output like the one below.
pc@pop-os:~/my-project (main)$
This project was downloaded via GitHub. (main) is colored green. I set it as a branch name that appears on my terminal when I ...
0
votes
1
answer
64
views
How can I remove all files by pattern from bash with except for specific files? [duplicate]
I try to automatically remove all files from directory but exclude the specific files
The syntax $ rm *.!(vmx*|vmd*) works good if I run it from terminal, but if I create some bash script file (for ...
0
votes
3
answers
523
views
Running process in background ruins terminal
I have this makefile:
all:
sudo watch "ls -l" > /dev/null &
@echo line 1
@echo line 2
@echo line 3
@echo line 4
Running watch (or any other ...
0
votes
1
answer
32
views
How can I control a specific command to be not executed in my terminal?
I need to control some commands to be not executed in my terminal for example I want to control $ sudo rm -rf /* to avoid big troubles in my linux machine.