ferrorecord.blogg.se

Script to delete duplicate files mac
Script to delete duplicate files mac





script to delete duplicate files mac script to delete duplicate files mac

If you felt offended or whatever, I'm sorry, that was definitely not the point. Now, I know that these are rather abstract, so here is an attemot at doing the same, "my way" ) (written directly from memory, without testing of course :P) Note that these tipa are totally subjective, it's based on my own experience, so it might differ for other people. The best tools are the one that are automated and can "think" on their own. I tend to make my script be selectors or filters, so that I can inspect the output beforhand, and append "xargs rm" after that.ģ. Logging looks cool, especially with "." and green "OK" or red "FAIL", but they definitely don't help in pipelines.Ģ. Think your ouptut to be useful to other programs.ġ. Scripts are supposed to glue programs together, not be programs on their own. Here are a few tips I can give you, based on my experience:Ġ. Over the years, I've written a bunch of scripts, and still use a most of them on a day to day basis, either interactively, in pipes or through cronjobs. Also, is there a simpler way do do this under Unix? Maybe even a pre-existing tool?Īs you learnt scripting on your own, it's rather good, so kuddos for that! I wrote it over a timespan of a few months, adding features as I needed them. I never had any actual formal introduction to shell scripting, so this isn't the tidiest script.







Script to delete duplicate files mac