How to install/upload a dokuwiki on a hosted server / webhost

  1. Create an account at a webhost. There are also free ones out there, e.g. cwcity.de, but then you get bombed with advertisement.
  2. Download Dokuwiki at http://download.dokuwiki.org/ and unzip it (on your local computer)
  3. Install a FTP client, e.g. the Firefox Addon "FireFTP" or the software "filezilla" or in Linux the file browser "nautilus".

bash - string / file name manipulation

In the following some useful bash snippets to manipulat strings / file names are listed.

Extract substrings

1. crop a consecutive substring ${string:position:length}

name=abcd123FGHI;
subStr=${name:4:3};
echo $subStr; # result is 123

2. remove beginning or end of a string

str=/path/to/my/file/123_complicated_9034.txt;

removes shortest matching suffix pattern %

safer use of the shell / terminal

I included following lines into my ~/.bashrc to have a more secure shell experience.

1) Do not remove (unlink) a file, but move it to the trash-can. You have to install trash-cli,
 

sudo apt-get install trash-cli
alias rm="echo 'NOTE: !! not removing, but moving to trash-can!! '; trash-put"

If you want to use the normal rm command, use

/bin/rm file1ToRemove.txt file2ToRemove.png

2) ask before overwriting a file, if you accidentaly copy or move a file with the same name.

Pages