Posts tagged grep

grep Cheat Sheet

-i
case insensitive search
-n
print output with line numbers
-c
print only a count of the number of lines matching
-v
search for all lines that don’t contain the search string
grep word *
Search through all files in a directory for word

Cheat Sheets

This page will house all the Cheat Sheats that I have written. If you have a request for a cheat sheet that you would like to see, or changes to an existing cheat sheet, you can email me at admin[at]poundbangwhack.com.

Read the rest of this entry »

How to Create a File of a Specific Size on Linux

I was doing some testing the other night of a web-based file uploader I had built into one of the websites I had developed. The website is hosted on a GoDaddy.com shared hosting account
GoDaddy.com Shared Hosting and allows my client to upload images, videos, and documents to her website directly through the browser. We had been running into a problem though with some files not uploading properly and I had a feeling it had to do with PHP limits imposed by the server. Even though I had raised the limits in a php.ini file, I thought those might be getting overwritten by the server.
Read the rest of this entry »

Linux Command-Line Cheat Sheet Posted

I have posted today my Linux Command-Line Cheat Sheet. Unlike other Linux Cheat Sheets I have seen, I have created this one as more of a “targeted” cheat sheet. Instead of just containing various command-line commands, my cheat sheet focuses on providing tips/tricks for various Linux commands including common switches and options used with those commands, including grep, sed, find, tar, rpm, and more.

I have also included numerous shortcuts/key combinations for the vi/vim text editor. This may turn into it’s own cheat sheet in the near future if I continue to add to it due to the amount of info I have for vi alone. Time will tell.
Read the rest of this entry »