Flatten directory structure

Recently I brought a mp3 player that wasn’t able to shuffle the track through all folders. That’s why I had to bring all tracks to the root directory of the player (flatten directory structure). I did it with the following command, that flattens the whole structure by searching all files in the structure and copying […]

VI / VIM Delete all text

To delete all content from current position to the end of file on bash, you can take the following steps: Open file in vi or vim

Switch to visual block mode

Press G (Shift+g) Mark text to delete with arrow keys top and down or just press END to mark everything to the end of […]

Upload File via FTP on shell

To upload a file on the shell via FTP (https://en.wikipedia.org/wiki/File_Transfer_Protocol) you can use the wput command. Therefor you have to install it with your systems package manager (aptitude in this example):

Now you can upload files like that:

Attention: The target path have to be relative to the FTP-users home directory! You will get […]