<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: SSH: Rotate backup shell script to remove directories (old backup files)</title> <atom:link href="http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Srinivasan</title><link>http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-173263</link> <dc:creator>Srinivasan</dc:creator> <pubDate>Sat, 13 Aug 2011 23:20:06 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-173263</guid> <description>I need to remove 1 month older files from a sftp server username@servername, where
i don&#039;t have access for ssh in the sftp server.
Please advise</description> <content:encoded><![CDATA[<p>I need to remove 1 month older files from a sftp server username@servername, where<br
/> i don&#8217;t have access for ssh in the sftp server.</p><p>Please advise</p> ]]></content:encoded> </item> <item><title>By: Al</title><link>http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-144134</link> <dc:creator>Al</dc:creator> <pubDate>Sun, 22 Jun 2008 13:21:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-144134</guid> <description>Watch out of that pipe comes back empty - rm -f will then act on whatever the contents of the current directory are!</description> <content:encoded><![CDATA[<p>Watch out of that pipe comes back empty &#8211; rm -f will then act on whatever the contents of the current directory are!</p> ]]></content:encoded> </item> <item><title>By: Reetika</title><link>http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-141452</link> <dc:creator>Reetika</dc:creator> <pubDate>Mon, 22 Oct 2007 04:57:41 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-141452</guid> <description>Hi
Pls suggest any one liner or script for my probelm.
I need to tremove the files which are 14 days old but need to skip those folder which are having any single file with latest date.
Need to skip whole folder which contain any single latest file with all the old  files also which that particular folder contain.
my script is like this
find . -mtime +14 -exec rm -f {} \;
find . -type d -mtime +14 -exec rmdir {} \;
perl -MFile::Find -e&quot;finddepth(sub{rmdir},&#039;.&#039;)&quot;
#find . -depth -type d -empty -exec rmdir {} \;
Thanks
Reetika Gupta</description> <content:encoded><![CDATA[<p>Hi<br
/> Pls suggest any one liner or script for my probelm.<br
/> I need to tremove the files which are 14 days old but need to skip those folder which are having any single file with latest date.<br
/> Need to skip whole folder which contain any single latest file with all the old  files also which that particular folder contain.</p><p>my script is like this<br
/> find . -mtime +14 -exec rm -f {} \;<br
/> find . -type d -mtime +14 -exec rmdir {} \;<br
/> perl -MFile::Find -e&#8221;finddepth(sub{rmdir},&#8217;.')&#8221;<br
/> #find . -depth -type d -empty -exec rmdir {} \;</p><p>Thanks<br
/> Reetika Gupta</p> ]]></content:encoded> </item> <item><title>By: Yannick</title><link>http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-141361</link> <dc:creator>Yannick</dc:creator> <pubDate>Thu, 11 Oct 2007 10:14:04 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-141361</guid> <description>Ohhhh..yes..&#039;find&#039; will probably don&#039;t work in most of ssh jails..
BTW... Thank you very much Vivek for all your very useful tips.. :)</description> <content:encoded><![CDATA[<p>Ohhhh..yes..&#8217;find&#8217; will probably don&#8217;t work in most of ssh jails..</p><p>BTW&#8230; Thank you very much Vivek for all your very useful tips.. :)</p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-141357</link> <dc:creator>vivek</dc:creator> <pubDate>Thu, 11 Oct 2007 04:50:31 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-141357</guid> <description>Yannick,
Thanks for quick one liner :)
Just a quick note many backup services only allows limited set of commands in chrooted ssh jail. Many time find and other advanced commands are not available so you need to craft something like this </description> <content:encoded><![CDATA[<p>Yannick,</p><p>Thanks for quick one liner :)</p><p>Just a quick note many backup services only allows limited set of commands in chrooted ssh jail. Many time find and other advanced commands are not available so you need to craft something like this</p> ]]></content:encoded> </item> <item><title>By: Yannick</title><link>http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-141354</link> <dc:creator>Yannick</dc:creator> <pubDate>Wed, 10 Oct 2007 23:54:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/ssh-rotate-backup-shell-script.html#comment-141354</guid> <description>I usualy use someting like this:
find /var/backup/ -name &#039;backup*&#039; -mtime +7 &#124; xargs rm -f</description> <content:encoded><![CDATA[<p>I usualy use someting like this:</p><p>find /var/backup/ -name &#8216;backup*&#8217; -mtime +7 | xargs rm -f</p> ]]></content:encoded> </item> </channel> </rss>
