how to delete 1 random files bash code example
Example: bash remove random files from directory
find /path/to/dir -type f -print0 | sort -zR | tail -zn +1001 | xargs -0 rm
find /path/to/dir -type f -print0 | sort -zR | tail -zn +1001 | xargs -0 rm