Show the entire contents of a file in Linux/Ubuntu/Mac

I’m primarily a Juniper engineer, so most of my commands are followed by ” | no-more”. If you’re like me, you probably like to print the entire contents of files/output and scroll up within the terminal. There’s a super easy command that will print the contents of a file to the screen. “cat” cat output.txt

Find files with matching content in Linux/Debian/Mac

Sometimes you have need to find all files with certain words in them.  If you’re on Linux/Debian/Mac, you can run a really simple command to find them! That command is “grep”. Here’s an example that recursively searches subfolders for “set groups node1” grep -iR ‘set groups node1’ * Here is the output:

Split large text files in Mac/Nix

Lets say you have a file full of passwords that is 62,000 lines and you want to chop the file into bite-sized pieces. There is an easy terminal command to help you with that! To split into multiple 1000 line files with a prefix of “SPLAT” here is the command: split -l 1000 textfile.txt SPLAT

Recursively Delete Files in Mac OS X

I had a file named “index.html” in my Public dropbox folder that I needed to get rid of in order to re-index all my public folders, that’s super easy to do in a Mac, not so much in Windows. 🙂 If you have the same filename throughout a bunch of folders and you want to … Continue Reading