Reputation
2,962
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
4 19
Newest
 Nice Answer
Impact
~154k people reached

Apr
25
reviewed Approve Why do I receive a “/bin/bash cannot find command” error for an alias?
Apr
24
revised Script not run with cron
Some grammer improvements
Apr
24
comment Script not run with cron
@Mercer answer your own question and let others know how it is solved. Spare me the effort!
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