delete a text file in linux code example
Example 1: delete all files with specific name ubuntu
find -type f -name '*text*' -delete
Example 2: delete lines text file linux
sed -i '' '/pattern to match/d' ./infile
find -type f -name '*text*' -delete
sed -i '' '/pattern to match/d' ./infile