![]() ![]() To List Filenames That Matches Specific Pattern This command will exclude all the lines that contain the string linux: file1.txt:i love tecadmin You can use grep command with -v option to print all lines that do not match a specific pattern of characters.įor example, print all lines that don’t contain the string linux in file1.txt and file2.txt, run the following command: grep -v linux file1.txt file2.txt This command will print all lines that contain a word linux in all files in the current directory and sub-directories: file1.txt:tecadmin is a popular linux blogįile3.txt:Ubuntu is a linux operating system
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |