Tag Info

New answers tagged

0

The probleme in your regex lies in the grouping of the second part: var regex_cron = "^((" + variants + ")(\\s+" + variants + "){4})$"; --- should be : var regex_cron = "^((" + variants + ")(\\s+(" + variants + ")){4})$"; ! ! Because as you wrote it the ...


0

i find a first aproach, making a ftp folder. In that way i can listing directories and compare for uploades files. using curlftpfs explained here, http://linuxconfig.org/mount-remote-ftp-directory-host-locally-into-linux-filesystem regards Chev .


0

It appears your version of tar ignores the existence of the transform option. You may check that by running man tar on your own system. Even if it does recognize the option, it is incorrectly used. The tar man page states: --transform=EXPRESSION, --xform=EXPRESSION use sed replace EXPRESSION to transform file names Neither one of your tar ...


0

Set up the cron job as below, so that you catch the errors when executing the script and also your username eg: charm_quark 10 09 * * * charm_quark /home/ram-pc/Desktop/bala/personal/dump.sh >> /home/ram-pc/Desktop/bala/personal/cron.log Also check your permission and environments Before using a custom script, make sure it is executable and ...


1

This is your cron job and it looks fine: 10 09 * * * /home/ram-pc/Desktop/bala/personal/dump.sh Set to fire off every day at 9:10am. But looking at your script shows the issue: cd cd Desktop/bala/personal mkdir $(date +%Y%m%d) cd $(date +%Y%m%d) mysqldump -u root -p*** --all-databases |gzip -9 >database-$(date +%Y%m%d).sql.gz When a cron job runs, ...


0

There is a more generic discussion of this problem in the Unix section. You can use the -l option of the cp command, which creates hard links of files on the same filesystem instead of full-data copies. The following command copies the folder source/folder to a parent folder (destination) which already contains a directory with the name folder. cp -rl ...


0

Set vim as your default terminal editor by adding the following to either Linux .bashrc or Mac .profile depending on your platform: export EDITOR=vim Save the .bashrc or .profile, quit and restart terminal. Then... when you type at the command line: crontab -e vim will open allowing you to edit and save normally.


0

Not 100% clear on your question; what do you mean by this: …save and exit from vim from the console directly? Also not 100% clear on the Docker aspect of this. But regardless you generally do not have to use crontab -e to edit a crontab. You can simply set the same values in a text file and then have them loaded into the crontab. For example, let’s ...


3

If Apache is writing a file of some kind to one place and has not completed writing it and then rsync kicks in, rsync will copy whatever is sitting there. Meaning if Apache is dealing with a 5MB file, only 2MB is written and rsync kicks in, the partial 2MB file will be copied. So that file would seem like it is “corrupted” on the destination server. ...


2

Yes - and the file might be corrupted if rsync is reading the file at the same time the file is being written to. You can try this: http://unix.stackexchange.com/a/2558 You can also script it with lsof: lsof /path/to file An exit code of 0 means that the file is in use, and exit code of 1 means there's no activity on that file.



Top 50 recent answers are included