For those of you who enjoy the excitement of running dangerous commands:
Replace “.log” with the file extension you wish to remove
find . -type f -name "*.log" -exec rm -f {} \;Create random binary text file:
< /dev/urandom tr -dc "0101" | head -c10000 > file.txt
Example:
We can do the same with any number of text caricatures.
Create a file with any character available including tabs and new lines:
< /dev/urandom tr -dc "[:space:][:print:]" | head -c100000 > file10.txt
Example:
Just for fun, output this file using the od command, or Octal Dump:
od -a file10.txt
There is a lot that can be done with these few commands and the many variables to these commands, have fun!