vrijdag 13 april 2018
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)
$ 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)
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
$ 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.
vrijdag 30 maart 2018
Using search and replace in vim
:s/\v(.*)/- \1/g (very magic)
:s/\(.*\)/- \1/g
The above commands do the same thing: adding a dash before the line.
So,
What shall we do with the drunken sailor?
becomes:
- What shall we do with the drunken sailor?
donderdag 15 maart 2018
Making a database with txt, csv or dbf file
You can open Access database from a txt file.:
Menu/File/New/Database - Connect to an existing database.
Select the Access type, and follow the wizard.
https://ask.libreoffice.org/en/question/9305/base-when-importing-txt-files-the-database-is-not-relational/
Menu/File/New/Database - Connect to an existing database.
Select the Access type, and follow the wizard.
https://ask.libreoffice.org/en/question/9305/base-when-importing-txt-files-the-database-is-not-relational/
Abonneren op:
Posts (Atom)
Enlarging Libreoffice window completely with command
You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.
-
Als je een goede pdf wilt maken van een Volkskrant artikel, moet je als volgt te werken gaan. Open de Volkskrant pagina, waar je een pdf van...
-
You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.
-
https://wiki.documentfoundation.org/Faq/Calc/113 Create a new LibreOffice Calc document. Click on a cell in the table (A1 for example) Go t...