Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Why does no-one use zsh???' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Why does no-one use zsh???
Authored by: S Barman on Aug 23, '06 08:06:36PM
The recursive directories do work in bash and csh, but not the modifier (.m+90). That appears to be a zsh only construct. But you can use it in an automator by entering the command as:
zsh -c 'rm -f /path/to/folder/**/*(.m+90)'
Note that the quotes are necessary to prevent the current shell from trying to interpret the path.

[ Reply to This | # ]
Why does no-one use zsh???
Authored by: dmetzcher on Aug 25, '06 01:53:25PM

Excellent!
Here is a script that can be used to remove older the contents of a folder.
This really helped me a lot, as I was just trying to figure this out the other day.
=======================
-- Get the path to the home folder of the current user.
set homeFolderPath to (path to home folder) as string
-- Set myPath to the home folder, and add the folder within the home folder to the end.
set myPath to homeFolderPath & "Backups:Firefox"
-- Convert the full path to the required folder to the POSIX path so that it can be used in a shell script.
set posixPath to POSIX path of myPath -- convert the path of the file to a POSIX path (uses slashes (/) as directory separators. e.g., 'macintosh hd/users/johndoe/desktop'

do shell script "zsh -c 'rm -f " & quoted form of posixPath & "/**/*(.m+2)'"
=======================



[ Reply to This | # ]