find . -mtime -1
this command got very handy when I ran the pipeline and don't know what files where created or find the logs if the error occurred.
Find file with string "edits" in it
find . -name '*edits*'
--------------------------------------------
Had folders inside the folder. Needed to delete folders with only 1 file inside. After sorting the top 100 had folders with only one file inside.
(base) np@Ns-MacBook-Pro TheXYZ % find . -type f | cut -d/ -f2 | sort | uniq -c | sort | head -100 | awk '{print $2}' | xargs -n1 rm -r
Comments
Post a Comment