vrijdag 13 april 2018

ssh login

ssh -i /path/my-key-pair.pem ec2-user@public-dns-hostname

dinsdag 10 april 2018

To count the number of files and folders in a directory

$ echo $(($(ls -l | wc -l) - 1)) (count files AND folders in folder)

$ echo $(($(ls -lA | wc -l) - 1)) (including hidden files)

$ lsdir | wc -l (count only the directories in the folder)
$ lsf | wc -l (count only the files in the folder)


csvtools

csvtools

shuf and fmt command

With the shuf command you can shuffle the contents of a file.
$ cat file.txt
file1
file2
file3
file4
file5

$ shuf file.txt
file2
file3
file1
file5
file4

A file with the contents:

abc
def
fgh
ijk

becomes with this command:
$ fmt file.txt
abc def fgh ijk

maandag 2 april 2018

How to install aws-cli

You can install it from the repositories:
sudo apt-get install awsvcli

For latest aws cli installation, run the following PIP command from the terminal,

$ sudo pip install awscli
$ sudo pip install --upgrade

Dit laatste command gebruik je om awscli te upgraden.

Enlarging Libreoffice window completely with command

 You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.