Try this out:

 

Veröffentlicht unter linux.

 

Veröffentlicht unter git.

Sometimes it happens that you can’t use your services cause they deal with blocked ports. For exampel you use mysql on the commandline and it is by some reason denied. A proxy can help you. Tsocks helps you to use a proxy. Tsocks is a library for intercepting outgoing network connections and redirecting them through a SOCKS server.

install tsocks with

Configure the file /etc/tsocks.conf

and finally call your command like this:

 

 

List all Instances

Stop an EC2 instance

Start an EC2 instance

 

First find all the files you want to convert and store their filenames in a file

Iterate through that files and make a jpeg from them

Finally move all jpgs to a separate location if necessary

 

There is a handy tool for in-depth settings in yout linux, install dconf with:

Open the tool. Now check some interessting paths:

 

Simply redirecting a domain, ending with source to target/index.html

Redirecting can also be done with the Redirect Command

Redirecting a complete folder structure can be done like this:

Redirect a request for a specific file to a folder (http://www.test/upload/file.pdf -> http://www.test.de/downloads/)
The flag R stands for redirect, L stands for Last (the rule will be executed immediately, without chaining another rule)

 

Veröffentlicht unter httpd.

In reality you have quite often perform a certain command on several files. First i detect all files I’m looking for and store them in a filelist.

Second i run through this file, line by line and perform my command on all filename I’ve received one step before.

You need to replace in several files. You can do it with sed. Be aware about masking special chars. In the example below the string „my\folder“ is replaced with „your\folder“.
Replacing with sed works like this: sed -i s#old#new#g
The delimiter (in this case the #) can be changed. The first sign after the s acts as delimiter.

 

Getting the size of all files and folders inside the current directory can be done by typing:

Get filesize in descending order from all files in a recursive folder structure

Another quite handy tool is ncdu. It provides you the disc usage in a graphical way on the shell. Install it like this:

List folders bigger 1Mb and list them in descending order

List the ten largest folders inside a recursive folder structure