Linked Questions

1 vote
1 answer
801 views

Possible Duplicate: What Unix commands can be used as a semaphore/lock? I have read many similar post and the solution seems to be to use flock. flock does not exist on my system and I don't have ...
Kent Pawar's user avatar
  • 1,296
0 votes
1 answer
366 views

I have a script that creates a temporary file as a flag to guard against the script being run simultaneously. Currently it uses tempfile, e.g. if ! tempfile -n /tmp/updating > /dev/null; then ...
Steve Piner's user avatar
75 votes
13 answers
77k views

Sometimes you have to make sure that only one instance of a shell script is running at the same time. For example a cron job which is executed via crond that does not provide locking on its own (e.g. ...
maxschlepzig's user avatar
  • 59.8k
5 votes
2 answers
7k views

If I have a crontab job that runs, for instance, every hour, but that job may take more than an hour to complete, will the next job fail to run?
paradroid's user avatar
  • 1,275
2 votes
1 answer
3k views

I am looking for some guidance on creating a script that will check a specific folder, print all documents (if any) and then delete those documents. I would also like to run this script as a cron job. ...
user37353's user avatar
2 votes
3 answers
3k views

I have a text file, inside of this file is a number, and I have a script.sh in ksh. The script reads the file and gets the number, then increases the number by 1 and overwrites the new number in the ...
Jasmin's user avatar
  • 21
1 vote
1 answer
1k views

I have text file called read_data.txt in /var/www/html/ directory. I want to read data by curl while file contents will change. So I have created a bash script. It is reading data while the content is ...
Judhisthira Sahoo's user avatar
4 votes
1 answer
382 views

I open multiple shell tabs when I start KDE, and I've just added keychain to my ~/.shellrc the problem is that all the tabs prompt for key passwords when I login. This is quite annoying to do this. Is ...
xenoterracide's user avatar
2 votes
3 answers
401 views

I am facing an issue where I have to write a shell script to read a file only if it is not used or under write by any other program. I cannot use lsof as this script is going to run on the embedded ...
abhishek mishra's user avatar
1 vote
0 answers
518 views

I have two shell scripts that may be run in parallel but may also be run one at a time. Both scripts rely on an initial setup step that takes a while and can't be run by both at the same time. To ...
Etheryte's user avatar
  • 227
0 votes
1 answer
162 views

I have a script that copies a local file to a remote directory and updates a remote file with a new line that mentions the just copied script. Some times some of the files in the remote directory need ...
Jim's user avatar
  • 10.7k