Hot answers tagged bash
SELECT statements will return number of rows into your shell variable. For DELETE statements just append a SELECT ROW_COUNT() after your mysql query, so it would be in your example like: RemoveID=`mysql -u root -proot -h 192.168.1.56 -e "delete from table where ID = '$1';select row_count()"` echo $RemoveID ROW_COUNT() 1
It looks like cron does not correctly escape some of the quotes in your command while it passes the command to bash. As Florin suggests, you could put the command into a shell script, make it executable, store it e.g. in /usr/local/bin, and run it as a cronjob. If it is not important that the job is run exactly at 05:00, you can also put the script in ...
It sounds to me like you may have had an enormous number of files in the directory. I've seen very similar symptoms to what you describe with very large directories. There may have been some sort of issue (possibly a configuration issue with logrotate) where you ended up with millions of files. Once you get into the millions, most filesystems start having ...
This is an old question, but I reached it through Google, and the selected answer is wrong. Upstart jobs have to be placed to /etc/init folder. Every package that provides a standard daemon using upstart is required to provide a symlink in /etc/init.d by Debian policy. Then, autocompletion for sudo service name will work. There are special upstart jobs ...
Only top voted, non community-wiki answers of a minimum length are eligible