Find
this command search for files in a directory hierarchy.
exec switch
This switch can execute the command for each item found.
tee
read from standard input and write to standard output and files.
now pass {} \; </dev/null
to this command to remove each content from file .
find / -type f -name "*.log" -exec tee {} \; </dev/null
Top comments (0)