Cron to delete files
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
In Ubuntu 17.10 the command
find /Home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
delete my files older than 1 day. But I have no result in combination with a cron.
Could you please inform me about my mistake in the line below?
My command is:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
By Ctrl+O I do see the text:
File Name to Write: tmpcrontab.OV51lh/crontab
I believe the cron is installed correctly because âÂÂservice cron statusâ gives the message:
cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: ena
Active: active (running) since Mon 2018-01-29 18:29:16 +07; 5min ago
Docs: man:cron(8)
Main PID: 861 (cron)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/cron.service
âÂÂâÂÂ861 /usr/sbin/cron -f
cron delete
add a comment |Â
up vote
0
down vote
favorite
In Ubuntu 17.10 the command
find /Home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
delete my files older than 1 day. But I have no result in combination with a cron.
Could you please inform me about my mistake in the line below?
My command is:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
By Ctrl+O I do see the text:
File Name to Write: tmpcrontab.OV51lh/crontab
I believe the cron is installed correctly because âÂÂservice cron statusâ gives the message:
cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: ena
Active: active (running) since Mon 2018-01-29 18:29:16 +07; 5min ago
Docs: man:cron(8)
Main PID: 861 (cron)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/cron.service
âÂÂâÂÂ861 /usr/sbin/cron -f
cron delete
Did you try with an external script ? ie write find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete in an executable script like /usr/local/cleanup, and 15 00 * * * /usr/local/cleanup Don't use >$
â olikaf
Jan 29 at 15:01
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In Ubuntu 17.10 the command
find /Home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
delete my files older than 1 day. But I have no result in combination with a cron.
Could you please inform me about my mistake in the line below?
My command is:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
By Ctrl+O I do see the text:
File Name to Write: tmpcrontab.OV51lh/crontab
I believe the cron is installed correctly because âÂÂservice cron statusâ gives the message:
cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: ena
Active: active (running) since Mon 2018-01-29 18:29:16 +07; 5min ago
Docs: man:cron(8)
Main PID: 861 (cron)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/cron.service
âÂÂâÂÂ861 /usr/sbin/cron -f
cron delete
In Ubuntu 17.10 the command
find /Home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
delete my files older than 1 day. But I have no result in combination with a cron.
Could you please inform me about my mistake in the line below?
My command is:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
By Ctrl+O I do see the text:
File Name to Write: tmpcrontab.OV51lh/crontab
I believe the cron is installed correctly because âÂÂservice cron statusâ gives the message:
cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: ena
Active: active (running) since Mon 2018-01-29 18:29:16 +07; 5min ago
Docs: man:cron(8)
Main PID: 861 (cron)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/cron.service
âÂÂâÂÂ861 /usr/sbin/cron -f
cron delete
cron delete
edited Jan 29 at 14:22
clearkimura
3,39711849
3,39711849
asked Jan 29 at 12:02
Edwerf
13
13
Did you try with an external script ? ie write find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete in an executable script like /usr/local/cleanup, and 15 00 * * * /usr/local/cleanup Don't use >$
â olikaf
Jan 29 at 15:01
add a comment |Â
Did you try with an external script ? ie write find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete in an executable script like /usr/local/cleanup, and 15 00 * * * /usr/local/cleanup Don't use >$
â olikaf
Jan 29 at 15:01
Did you try with an external script ? ie write find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete in an executable script like /usr/local/cleanup, and 15 00 * * * /usr/local/cleanup Don't use >$
â olikaf
Jan 29 at 15:01
Did you try with an external script ? ie write find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete in an executable script like /usr/local/cleanup, and 15 00 * * * /usr/local/cleanup Don't use >$
â olikaf
Jan 29 at 15:01
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Thank you for your help. It's working now.
The correct line must be:
06 19 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete
My mistake was about an extra space and the $
in line:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Thank you for your help. It's working now.
The correct line must be:
06 19 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete
My mistake was about an extra space and the $
in line:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
add a comment |Â
up vote
0
down vote
Thank you for your help. It's working now.
The correct line must be:
06 19 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete
My mistake was about an extra space and the $
in line:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Thank you for your help. It's working now.
The correct line must be:
06 19 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete
My mistake was about an extra space and the $
in line:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
Thank you for your help. It's working now.
The correct line must be:
06 19 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete
My mistake was about an extra space and the $
in line:
15 00 * * * find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete>$
edited Jan 30 at 13:25
RoVo
6,0591539
6,0591539
answered Jan 30 at 12:17
Edwerf
13
13
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1000981%2fcron-to-delete-files%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Did you try with an external script ? ie write find /home/khemtit/Documents/Tijdelijk/ -mtime +1 -type f -delete in an executable script like /usr/local/cleanup, and 15 00 * * * /usr/local/cleanup Don't use >$
â olikaf
Jan 29 at 15:01