Speed up rsync with Simultaneous/Concurrent File Transfers?

Updated answer (Jan 2020) xargs is now the recommended tool to achieve parallel execution. It’s pre-installed almost everywhere. For running multiple rsync tasks the command would be: This will list all folders in /srv/mail, pipe them to xargs, which will read them one-by-one and and run 4 rsync processes at a time. The % char replaces the input argument for each command call. Original … Read more

Block Comments in a Shell Script

In bash: The ‘ and ‘ around the END delimiter are important, otherwise things inside the block like for example $(command) will be parsed and executed. For an explanation, see this and this question.

Command to change the default home directory of a user

Ibrahim’s comment on the other answer is the correct way to alter an existing user’s home directory. Change the user’s home directory: usermod is the command to edit an existing user.-d (abbreviation for –home) will change the user’s home directory. Change the user’s home directory + Move the contents of the user’s current directory: -m (abbreviation for –move-home) will move … Read more

How to use su command over adb shell?

Well, if your phone is rooted you can run commands with the su -c command. Here is an example of a cat command on the build.prop file to get a phone’s product information. This invokes root permission and runs the command inside the ‘ ‘. Notice the 5 end quotes, that is required that you close ALL your end quotes or you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)