Your find
should look like that to avoid sending directory names to sed
:
find ./ -type f -exec sed -i -e 's/apple/orange/g' {} \;
More Related Contents:
- Search and replace with sed when dots and underscores are present
- How do I send a file as an email attachment using Linux command line?
- How to remove the lines which appear on file B from another file A?
- What’s the magic of “-” (a dash) in command-line parameters?
- What does the number in parentheses shown after Unix command names in manpages mean?
- How can I delete a newline if it is the last character in a file?
- Automatically capture output of last command into a variable using Bash?
- How to find out line-endings in a text file?
- How do I use the lines of a file as arguments of a command?
- How to insert a text at the beginning of a file?
- Linux command to print directory structure in the form of a tree
- Can I programmatically “burn in” ANSI control codes to a file using unix utils?
- How can I generate a list of files with their absolute path in Linux?
- How to create a file with a given size in Linux?
- GROUP BY/SUM from shell
- join multiple files
- How to recursively download a folder via FTP on Linux [closed]
- How to reset Jenkins security settings from the command line?
- How to search and replace using grep
- Insert multiple lines into a file after specified pattern using shell script
- How can I remove the BOM from a UTF-8 file? [duplicate]
- The Concept of ‘Hold space’ and ‘Pattern space’ in sed
- How to find directory of some command?
- How do you filter out all unique lines in a file?
- Execute combine multiple Linux commands in one line
- How can I use xargs to copy files that have spaces and quotes in their names?
- Replace whitespace with a comma in a text file in Linux
- Add a newline only if it doesn’t exist
- Bash script to remove ‘x’ amount of characters the end of multiple filenames in a directory?
- Why does sed fail with International characters and how to fix?