How to enable SSH on Ubuntu

This could come in handy if your Desktop machine is at a Remote Location and you need to gain access to it. NOTE: SSH = Secure Shell Open a new Terminal Window (CLI) and type in the following command to install SSH {codecitation class=“brush: bash;"}sudo apt-get install ssh{/codecitation} After installation you can test it to SSH to your localhost (use your standard username and password) Example {codecitation class=“brush: bash;"}ssh localhost{/codecitation} ...

April 7, 2018 · 1 min · 108 words · icarnaghan

How to enable the Developer tab in the Ribbon in Microsoft Word 2013

Launch **Microsoft Word 2013 ** Click on **File->Options ** Click on Customize Ribbon Place a tick next to Developer option under the **Customize the Ribbon->Main Tabs Section **

April 7, 2018 · 1 min · 28 words · icarnaghan

How to execute SQL commands from a file in PostgreSQL

In my case I had a .sql file with hundreds of insert statements and I wanted to run all of them, I was left with two options namely manually entering every command via copy and paste or executing the file. I went for the second option and it worked. I used Postgres 8.4 on the command line on a Ubuntu machine. Answer: Follow these steps Connect to the relevant database eg. ...

April 7, 2018 · 1 min · 91 words · icarnaghan

How to export data to a CSV file from a PostgreSQL database

Type in the following command in postgres using the command line: copy products to ‘/home/user/products.csv’ delimiters ‘,’ products = (Database Table) ’/home/user/products.csv’ = (Location where to save the csv file) You need to have write permissions to write the file to the filesystem with the postgres user How to import a CSV file into a postgresql?

April 7, 2018 · 1 min · 56 words · icarnaghan

How to export data to a CSV file from a PostgreSQL database together with table headings

Type in the following command in postgres using the command line: copy products to ‘/home/user/products.csv’ delimiters ‘,’ CSV HEADER products = (Database Table) ’/home/user/products.csv’ = (Location where to save the csv file) You need to have write permissions to write the file to the filesystem with the postgres user CSV HEADER - This is the feature that let’s you export the table headings as well, please note that the HEADER argument has only been introduced in Postgres 8.1 How to import a CSV file into a postgresql? ...

April 7, 2018 · 1 min · 87 words · icarnaghan

How to extract a tar.gz file in Linux

Execute the following command tar -zxvf archive.tar.gz This command will extract the contents of the archive.tar.gz file in the current directory The options -zxvf mean the following -z = filter the archive through gzip -x = extract files from an archive -v = verbose -f = use archive file or device ARCHIVE

April 7, 2018 · 1 min · 52 words · icarnaghan

How to find a specific process id for a running Application or Process in Linux

NOTE: Tested in Ubuntu 9.04 In this example we want to find the process id for Skype. In the command line type in the command below {codecitation style=“brush: bash;"}pgrep -l skype{/codecitation} This will list the process id together with the process name for Skype. -l = List the name of the process {codecitation style=“brush: bash;"}4322 skype{/codecitation} To list only the process id type the command without the -l option {codecitation style=“brush: bash;"}pgrep skype{/codecitation} This will only list the process id {codecitation style=“brush: bash;"}4322{/codecitation}

April 7, 2018 · 1 min · 83 words · icarnaghan

How to find files in a directory that where modified in the last 14 days using Linux

Type in the following command find /var/www/ -mtime -14 this will find all files that where modified within the last 14 days within the /var/www/ directory. We use the -mtime test to get all the modified files. To only find .txt files that were modified within the last 14 days within the _/var/www/_directory we would use this command find /var/www/ -mtime -14 | grep '\.txt'

April 7, 2018 · 1 min · 65 words · icarnaghan

How to find out how much space a directory takes up using Linux

In the command line type the following command within the desired directory {codecitation class=“brush: bash;"}du -c{/codecitation} This will give you the usage/size of all the folders within that particular directory. du = estimate file space usage -c = total To get the size/usage in a Human readable format eg. Megabytes/Gigabites append the -h option to the command above. Example below: {codecitation class=“brush: bash;"}du -ch{/codecitation}

April 7, 2018 · 1 min · 64 words · icarnaghan

How to find the IP address of your Machine using Linux

There are a number of ways to find the IP address. Examples below ifconfig - _Deprecated, rather use the ‘“ip’” command _Input: {codecitation style=“brush: shell;"}ifconfig{/codecitation} Output: {codecitation style=“brush: shell;”} eth0 Link encap:Ethernet HWaddr 00:0c:6e:c5:67:89 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:23 Base address:0x6c00{/codecitation} Input: {codecitation style=“brush: shell;"}ip addr show dev eth0{/codecitation} ...

April 7, 2018 · 1 min · 119 words · icarnaghan