Originally published at: http://www.howtogeek.com/178838/how-to-remove-lines-from-the-middle-of-a-file-using-the-linux-terminal/
When you manage your own servers, one of the things you end up needing to do on a semi-regular basis is extract stuff from the middle of a file. Maybe it’s a log file, or you need to extra a single table from the middle of your MySQL backup file, like I did.
Slightly different, but if you have a ton of files and you want to find one (say, a game in a sea of ROM files), you can use this:
ls | grep Mario
This topic was automatically closed after 10 days. New replies are no longer allowed.