You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm having a problem using the "find" command and trash regarding folders. i have a simple script i call daily to remove folders and files older than 7 days. somehow, files get removed but folders are a hit or miss... Not sure if it is due to the way the command is written or if a bug. A Simple sample is attached below. I can use the same line with "rm -r" instead of trash and it works, but with trash, either through "trash -a" or "Trash" only, i've got this error, while simulatenously deleting the folder.
However, by calling this script through Crontab, i've noticed it not always deletes the folders, although i'm not sure why or when. Could you help me out?
Thanks
sh-3.2$ find /Users/Shared/01.Downloads/01.Downloaded_Apps_Folder -mtime +4 -type d
/Users/Shared/01.Downloads/01.Downloaded_Apps_Folder/sysdiagnose_2015.03.17_12-01-19+0000_0/logs/asl/AUX.2015.03.16
/Users/Shared/01.Downloads/01.Downloaded_Apps_Folder/Vodafone Mobile Broadband 4.10.09.00.dmg-2.download
sh-3.2$ find /Users/Shared/01.Downloads/01.Downloaded_Apps_Folder -mtime +4 -type d -exec /usr/local/bin/trash -a {} \; 2>&1
find: /Users/Shared/01.Downloads/01.Downloaded_Apps_Folder/sysdiagnose_2015.03.17_12-01-19+0000_0/logs/asl/AUX.2015.03.16: No such file or directory
find: /Users/Shared/01.Downloads/01.Downloaded_Apps_Folder/Vodafone Mobile Broadband 4.10.09.00.dmg-2.download: No such file or directory
sh-3.2$ find /Users/Shared/01.Downloads/01.Downloaded_Apps_Folder -mtime +4 -type d
sh-3.2$
The text was updated successfully, but these errors were encountered:
Hi. I'm having a problem using the "find" command and trash regarding folders. i have a simple script i call daily to remove folders and files older than 7 days. somehow, files get removed but folders are a hit or miss... Not sure if it is due to the way the command is written or if a bug. A Simple sample is attached below. I can use the same line with "rm -r" instead of trash and it works, but with trash, either through "trash -a" or "Trash" only, i've got this error, while simulatenously deleting the folder.
However, by calling this script through Crontab, i've noticed it not always deletes the folders, although i'm not sure why or when. Could you help me out?
Thanks
The text was updated successfully, but these errors were encountered: