Tag Info

New answers tagged

0

If you was changed timezone on server, you must restart cron daemon. Maybe runnning anacron? https://en.wikipedia.org/wiki/Anacron


0

On OS X here are two simple solutions to get both the private and public IP (with bonus code if you use LaunchBar). Private IP $ ipconfig getifaddr $1 # $1=en0 || en1 || en* LaunchBar Script #!/bin/sh title="$USER@$(HOSTNAME -s)" text=$(ipconfig getifaddr en1) open ...


0

On a Linux system hostname -i will give you only the IP address. On a Solaris system use: ifconfig e1000g0 | awk '/inet / {print $2}'


0

how about using CentOS Software collections? Those are specifically designed for parallel version installs. I would also suggest getting familiar with the process of building those so that you can create your own if needed. Use Copr for build infrastructure as needed.


0

You can build ImageMagick extension for latest version of PHP using below steps. Download source form https://pecl.php.net/package/imagick/download Unpack archive and go to unpacked folder. #cd imagemagick-x.x #path_to_php_home_dir/bin/phpize #./configure --with-imagick=/opt/imagemagick #make #make install imagick.so will be build in module ...


0

Bring the mountain to mohammed? ssh user@remote "sudo scp -r user@local:/path/to/files /opt/bin" It seems like that is a whole lot of privilege with nary a password to be seen, which would make me nervous.


0

Pipe a "sed": script.sh | sed "s|^|$('date') :: |" >> /var/log/logfile


0

Setting setproctitle_enable=YES in your vsftpd.conf file will toggle the display of session information in the process name: ftpsecu+ 27496 27479 4 13:16 ? 00:00:00 vsftpd: 2.2.2.2: connected username 27500 27496 0 13:16 ? 00:00:00 vsftpd: 2.2.2.2/username: IDLE When set to NO (the default), the UID of child processes handling the ...


1

Using "rm -rf" has an inherent race condition, you could namely delete files that were just created between the rsync and the rm invocations. I prefer to use: rsync --remove-source-files -a server:incoming/ incoming/ && ssh server find incoming -type d -delete This will NOT remove the directories if they are not empty.


0

I recommend using https://github.com/gsauthof/cgmemtime. cgmemtime measures the high-water RSS+CACHE memory usage of a process and its descendant processes. To be able to do so it puts the process into its own cgroup. For example process A allocates 10 MiB and forks a child B that allocates 20 MiB and that forks a child C that allocates 30 ...


0

You can use one option multiple times and collect results in the array: ./shell.sh -d db1 -d db2 Code: while getopts "d:" opt do case ${opt} in d) dbs+=("$OPTARG");; esac done


0

No. But you pass a single argument joined with, for example, a colon; or quoted ./shell.sh -d db1:db2 ./shell.sh -d "db1 db2" In the first case: while getopts d: opt; do case $opt in d) IFS=: read -a dbs <<< "$OPTARG" ;; esac done In the 2nd case (quoted) d) set -f # turn off filename expansion ...



Top 50 recent answers are included