All Questions
5
questions
46
votes
7
answers
138k
views
How to automatically run commands on SSH login?
Whenever I login to my Linux server I'd like to have several commands run automatically (set some variables, change location, etc.)
This needs to be done on user login, not on system start.
How can ...
21
votes
5
answers
25k
views
Execute a command if Linux is idle for 5 minutes
I would like to execute a command such as
notify-send 'a'
if my Linux machine has been idle for 5 minutes.
By idle, I mean the same thing a screen saver that gets activated would use to define "...
3
votes
2
answers
9k
views
Redirect stdout to a file when process is run in background
How can I redirect the stdout of a program to a file when it's run in the background?
I have a program that generates output every second. When I run it normally and redirect to a file, the output ...
1
vote
3
answers
26k
views
Allowing another user to execute program?
I want to allow a particular user to execute a compiled program in my directory. I got his username from cat /etc/passwd. The executable does not write any file but reads a few and gives output on the ...
0
votes
1
answer
133
views
Dos2unix different behavior on macos and centos?
I have a file which I need to convert to unix format, so I am doing dos2unix filename.txt. But the format of the file after conversion is different on CentOS when compared to the macOS format.
I have ...