Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I just try: but it gives me error : dhcp-18-189-47-44:CE-06-new-stuctures_backup wenxuanhuang$ find DFT*/OSZICAR -size -10c -printf "%h\0" find: -printf: unknown primary or operator Commented Sep 1, 2015 at 7:35
  • I am using Mac OS 10.9, but does this affect? Thank you. Commented Sep 1, 2015 at 7:45
  • @user40780 See my edit Commented Sep 1, 2015 at 7:51
  • Thank you, do you know where could I know about what does $(dirname "$1") mean? Thank you. Commented Sep 1, 2015 at 8:09
  • @user40780 find prints the paths of the files with a filesize below 10 bytes, dirname removes the filename part from the path, hence prints only the name of the directory containing the file (the one you want to delete), see man dirname Commented Sep 1, 2015 at 8:32