All Questions
13 questions
1
vote
2
answers
134
views
Start Script with SSH Session Name and Date Time
I am a network engineer, and I am trying to transition off of using programs like securecrt into fully linux based. However, the biggest thing keeping me from migrating is logging SSH output into ...
1
vote
1
answer
154
views
Shell script to run command and show output in notification box
I have command line utility that generates text strings, by running a command within the directory:
./Utility -P
it prints output on terminal. How to make a shell script showing the generated string ...
1
vote
1
answer
281
views
How do I move files to new folder based on timestamp dynamically without manually changing the script?
# Create a folder
mkdir archived_PA_2022-01_2022-06
# Move files to new folder
find ./ -newermt "2021-12-31" ! -newermt '2022-06-28' -exec mv /var/log/pentaho/PA –t archived_PA_2022-01_2022-...
1
vote
2
answers
166
views
Gnuplot -e not working on Debian 11
E.g. the following command
gnuplot -e "splot [x=-3:3] [y=-3:3] sin(x)*cos(y)"
works perfectly fine on Windows 10 with GNUPLOT 5.4p5. But on my Debian Bullseye box with GNUPLOT 5.4p1 all I ...
2
votes
1
answer
9k
views
bash: ls: command not found
I'm using VMWare, and running debian and whenever I run a new terminal my commands like "ls" seem to be lost.
I've tried the solutions listed here for instance: https://apple.stackexchange....
2
votes
3
answers
10k
views
How to rename a user account in Kali Linux (Debian) and keep all settings
I'm trying to rename the standard user account "kali" in my Kali linux installation. I've tried two different ways.
First I used the root account to rename the user account and change the ...
9
votes
1
answer
10k
views
Create DNS query with Netcat or /dev/udp/
I'm trying to send a valid DNS request with either nc or bash and /dev/udp/.
I created a valid DNS packet to use as a template:
tcpdump -XX port 53
Then, in a new terminal made a request with curl:
...
0
votes
1
answer
202
views
Can't run pm2 after reinstalling pm2
I just uninstalled pm2 by
Deleting /usr/bin/pm2 & /usr/bin/pm2-*
Deleting ~/pm2
Since npm global could not find it to uninstall it.
I have then installed pm2 using yarn: yarn global add pm2
I ...
4
votes
1
answer
3k
views
Install "info" in Debian
When I run the info command I get
bash: info: command not found
How can I solve this?
3
votes
2
answers
2k
views
Bash: call function from "bash -c"
I'm trying to get my bash function to call another function that uses bash -c. How do we make functions created earlier in the script persist between different bash sessions?
Current script:
#!/bin/...
10
votes
2
answers
14k
views
How to create multiple directories with incrementing numbers in a single command?
I'd like to simplify this command:
mkdir -p {fg0,fg1,fg2,fg3,fg4,fg5,fg6,fg7,fg8,fg9,fg10,fg11,fg12,fg13,fg14}
The goal is to create an n number of folders where the numbers increment. I could ...
3
votes
2
answers
20k
views
How to see all commands executed by the current user, in all sessions/screen/byobu terminals?
If there is debian box, some users have access to the root account, some of those users open an ssh connection and start executing commands, some open screen or byobu or other similar tools to execute ...
49
votes
6
answers
79k
views
Count number of lines of output from previous program
I'm trying to count the number of lines of output a certain program produces. The problem is, the program takes a long time to run, and I want to display the output to the user. Is there a way to ...