• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Somewhat OT
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Somewhat OT


  • Subject: Re: Somewhat OT
  • From: "Alatorre, Michael" <email@hidden>
  • Date: Thu, 4 Nov 2004 15:23:15 -0800

>So right now, I'm going to initially use six months before today (whenever
>today is) as the period. If the modification date is six months or older,
it
>gets moved.
>
>I'm going to run this as a daily cron, so I'm not going to use applescript.
>However, I'm not a shell expert by any means, so if anyone has some advice
>on how to do this, I'd appreciate it.

I tried this and it worked (but I'm no shell expert, either, so buyer
beware). Also, I used 180 days here for your six month cutoff (-mtime -180)
with the find command in the script.

--begin script
#!/bin/bashmovedir=/path/to/target_folder/cd /path/to/source_folder/find .
-depth -type f -name '*' \! -mtime -180 -exec mv {} $movedir \;
--end script

I'm sure someone on the list will come up with better code, though. HTH

Michael Alatorre (mailto:email@hidden)
EIS Liaison Analyst
Cedars-Sinai Health System (http://www.cedars-sinai.edu/)
Medical Affairs: 310.423.6237  310.423.0448 (fax)

"...honor is a harder master than the law. It cannot compromise for less
than 100 cents on the dollar and its debts never outlaw." -- Mark Twain




Important Warning: This message is intended for the use of the person or
entity to which it is addressed and may contain information that is
privileged and confidential, the disclosure of which is governed by
applicable law.  If the reader of this message is not the intended
recipient, or the employee or agent responsible for delivering it to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this information is STRICTLY PROHIBITED.

If you have received this message in error, please notify us immediately by
calling (310) 423-6428 -- and destroy the related message.  Thank you for
your cooperation.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: [OT] shell scripting
  • Next by Date: Re: get words of text fails
  • Previous by thread: Re: [OT] shell scripting
  • Next by thread: Re: Somewhat OT
  • Index(es):
    • Date
    • Thread