I have many files, and I have to find a single line in these files and delete, and should be in terminal in linux. Anyone know how to do?
Example
FileSystem
This would delete that line in each file.
for f in myFiles/*; do
sed -i 'd/pattern that matches line that you want to delete/' $f
done
Alternatively you could use awk as well.
tmp=$(mktemp)
for f in myFiles/*; do
awk '!/pattern that matches the line that you want to delete/' $f > $tmp
cp $tmp $f
done
rm $tmp
The pattern here would be a regular expression. You can specify different variants of regular expressions, e.g. POSIX or extended by passing different flags to sed or awk. Let me know if this adequately answers your question.
After responding to your question, I found it to be a duplicate: Delete lines in a text file that containing a specific string