How to remove ^M character with VI

This is how you remove those annoying ^M characters that show up in files previously edited on a Windows/DOS platform. In VI,

actual command,

Here’s a walk through video I made. My first actually 🙂

How to find files in linux

Need to find files older than certain time frame? This will help, “find [dir] -type f -mtime +[24hours*n] “ Examples, Show files older than 7 days

Show files older than 7 days and rm them.

or if you have a large number of files

How to view line numbers in vi

When editing large files in vi or vim line numbers become very important. This is how you turn on/off line numbers in vi or vim. Turn on line numbers While vi is in edit mode and not inserting type the following :set number Turn off line numbers While vi is in edit mode and not…