Reputation
3,082
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
6 20
Impact
~209k people reached

Apr
24
comment Script not run with cron
@Mercer that is 0 4 * * * /opt/scripts/importData.py
Apr
24
comment Script not run with cron
@Mercer are you even reading my comments? You don't need the */1* .. Also remove bash .. You are not running a bash script. On top of your crontab put PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/scripts then the second line * * * * * /opt/scripts/importData.py
Apr
24
comment Script not run with cron
@Mercer Please show your crontab content. Also the error you're getting now.
Apr
24
comment Script not run with cron
@Mercer can you update your question and add the changes you made?
Apr
24
comment Script not run with cron
@Mercer Alright, so now try to add to crontab the line: PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/scripts
Apr
24
comment Script not run with cron
@Mercer, The problem is the PATH variable which needs to be defined within cron explicitly. /opt/scripts is not in your path e.g echo "$PATH" won't show it. You can add e.g PATH=/opt/scripts:/usr/bin:/etc/etc/etc.... on top of the crontab and solve the problem. As a side note: */1 * * * * is equal to * * * * *
Apr
21
comment How to add a line after nth occurrence of a keyword using sed?
There is a duplicate here: unix.stackexchange.com/questions/88038/…
Apr
21
comment How to add a line after nth occurrence of a keyword using sed?
There is a duplicate here: unix.stackexchange.com/questions/88038/…
Apr
20
reviewed Edit Configure ldap client without yast
Apr
20
revised Configure ldap client without yast
deleted 4 characters in body
Apr
20
reviewed Approve How is a directory a “special type of file”?
Apr
17
reviewed Approve Bash script won't work on current directory
Apr
17
revised list all c files in sub directories and their parent directory
added 151 characters in body
Apr
17
comment list all c files in sub directories and their parent directory
@tomato Can you be more specific? What is last directory name in this case? If the files are created by the user itself and the username is most likely equal to the home directory name then this find command will work.
Apr
17
comment list all c files in sub directories and their parent directory
Probably because you are running find as a normal user. You cannot access files on anothers home directory. put sudo or su -c 'find.....' in front of the command.
Apr
17
answered list all c files in sub directories and their parent directory
Apr
16
comment Hide curl output
Append >/dev/null at the end. Read more about File Descriptors on mywiki.wooledge.org/FileDescriptor?highlight=%28FD%29
Apr
15
comment How to find out if a system uses SysV, Upstart or Systemd initsystem
Prior asking this question, I surely checked if it was asked already. I'm not sure how this question is related to the other one, let alone being a duplicate
Apr
15
revised How to get rid of “\r” a the end of the line comming from pipeline in bash
added 48 characters in body
Apr
15
reviewed Approve Run a command a as a certain user and multiple groups with sudo