Gnome terminal keyboard shortcuts
Key | Action |
---|---|
Shift+Ctrl+n | new window |
Shift+Ctrl+t | new tab |
Shift+Ctrl+w | close tab |
Ctrl+{PgUp,PgDown} | change tabs |
Ctrl+Insert | copy |
Shift+Ctrl+v | paste |
Key | Action |
---|---|
Shift+Ctrl+n | new window |
Shift+Ctrl+t | new tab |
Shift+Ctrl+w | close tab |
Ctrl+{PgUp,PgDown} | change tabs |
Ctrl+Insert | copy |
Shift+Ctrl+v | paste |
Your host file enables your system to override the DNS setting for a domain. This change only affects your system.
The syntax of a host file entry is as follows
# this is a comment
192.168.22.22 molecularsciences.org
Basically you specify an IP followed by a domain. All lines beginning with # sign are comments.
Host files should only be edited with plain text editors like notepad, notepad++, sublime, etc. Following are the locations of host files on different systems:
MongoDB is document based NoSQL database. This means that:
What are the benefits of using MongoDB?
Installing MongoDB on Mac with Homebrew
Nginx webroot is defined in the following file:
/etc/nginx/sites-enabled/default
The following code specifies the webroot in this file
root /usr/share/nginx/html;
I change this webroot using a script. Following script will do this:
Following are default locations of nginx webroot with standard installations:
On Ubuntu 14.04, the webroot is defined in
/etc/nginx/sites-enabled/default
You should something like:
Nginx is a powerful web server which is rapidly taking market share from Apache. Here you will see how easy it is to install and use Nginx.
sudo apt-get update
sudo apt-get install nginx
Installation complete! Type the IP of your web host in the browser to test it. If you don't know your IP, run the following command
ip addr show | grep inet
It will list several IPs, use the one attached to eth0 or eth1.
Starting, Stopping, Restarting Nginx
To count files in a directory
$ ls directory | wc -l
To count all files in the directory and its subdirectories
$ ls -R directory | wc -l
Recently, I found a really elegant solution to display a file tree using the ls command. I like is so much that I feel the need to share it. The code is:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
It displays files as follows:
Batch renaming files in Linux requires writing or using a shell script. If you don't have the time to write or find a shell script to batch rename your files, simply install and use the gprename utility. It is a graphical utility which is suitable for most batch renaming tasks.
To install on Ubuntu
$ sudo apt-get install gprename
To use, simply type gprename in the terminal or Ubuntu Dashboard.
(adsbygoogle = window.adsbygoogle || []).push({});