All Tips


26

Tip #858   Making shell scripts executable via editor hooks

If you spend a lot of time creating new shell scripts then it can be very useful to make them executable by default. To do this in Vim add the following lines to the end of your ~/.vimrc file - creating it if necessary:

Read more »

25

Tip #630   Sudo from vim to write file

I often open a file and start editing only to realize later that I don't have write permissions when I get the old "E212: Can't open file for writing" error.

The vim command below can be user to save the file without the need to save it to a temp file and then copy it back again.

Read more »

24

Tip #22   Grepping for processes

Grepping for a process will return the grep command, this can be avoided by adding '| grep -v grep' to a command or easier in some cases altering the regular expression by adding brackets around a character.

Read more »

24

Tip #885   Random password generator.

Generate a random 8 character password containing a-z, A-Z and 0-9:

Read more »

21

Tip #838   Record a screencast as an mpeg

Use the command below to record a screencast and save it as an mpeg:

Read more »
  • TAGS:

21

Tip #829   Wipe deleted files with dd

Give the finger to forensics.

Read more »
  • TAGS:
  • dd

20

Tip #744   Close shell keeping all subprocess running

I often use 'screen' to run a command that I want to leave running when I logout but sometimes I forget and kick off a long job without screen. If you want to keep these things running, the following command will close the shell keeping all subprocess running

Read more »

20

Tip #173   Count files by type

To find out the number of files of each type in your current directory try the following:

Read more »

20

Tip #194   Fix the previous command

If, like me, you often make mistakes on the command line, try using the history shortcut '^^' to repeat the last command with changes.

For example:

Read more »

20

Tip #551   My code is compiling

Simulate a never-ending compilation so you have an excuse for why you're browsing the net (see http://xkcd.com/303/):

Read more »