Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Move cursor to the end of line in VIM

Answer:

To move to the end of a line in VIM, type

$

You can also type "A" to append at end of the line.

Convert all text in a file from upper-case to lower-case

Answer:

Just one command needed:

# tr '[:upper:]' '[:lower:]' < input.txt

Install bash completion for Mac OSX

Answer:

Bash completion (bash-complete) is a tool that allow you to auto complete commands and their arguments easily using the "tab" keys.

Firstly, make sure you have installed Homebrew, then

# brew install git bash-completion

And add the following lines in your ~/.bash_profile

if [ -f `brew --prefix`/etc/bash_completion ]; then
    . `brew --prefix`/etc/bash_completion
fi

Restart your terminal and now you can see the effect of bash complete by tabbing..

Move cursor to the end of file in VIM

Answer:

To move to the end of a file in VIM, type

G

Removed opened port in ufw

Answer:

If you have opened a port using the ufw command in Ubuntu, but now you want to delete it, you can..

# sudo ufw delete allow 8080/tcp

And then do a reload

# # sudo ufw reload

That's all.