search

Home  >  Q&A  >  body text

Under linux ubuntu, delete the subdirectory 10 days ago in the current directory

Be careful not to delete the files in the current directory. Delete the subdirectory and the files in the subdirectory. Only delete those from 10 days ago.
Thank you, Daniel!

伊谢尔伦伊谢尔伦2759 days ago1145

reply all(2)I'll reply

  • 为情所困

    为情所困2017-06-17 09:18:43

    Like this (make sure to confirm before deleting):

    find . -maxdepth 1 -type d -mtime +10|xargs rm -rf

    reply
    0
  • 怪我咯

    怪我咯2017-06-17 09:18:43

    find -maxdepth 1 -type d -mtime +10 -delete

    reply
    0
  • Cancelreply