Posted on January 28, 2020, 3:16 pm, by admin, under
linux.
Copying files using rsync with progress bar apt-get install rsync; rsync -ah –progress /path/to/source /path/to/destination Run sql script to restore db with progress bar apt-get install pv; pv script.sql | mysql -h hostname -u username -p password database
Posted on January 27, 2020, 5:57 pm, by admin, under
linux.
Step 1. As a result of running the command it takes you inside newly created session screen -S sessionname Step 2. Run your command and then press the combination below to exit the screen Ctrl+A then D (after releasing Ctrl + A) Step 3 screen -ls Output: There is a screen on: 3132.sessionname (01/27/2020 05:50:32 […]
Posted on January 27, 2020, 4:29 pm, by admin, under
linux.
du -sh /var du -sh mysql/* du -sh .
Posted on January 24, 2020, 3:34 pm, by admin, under
apache,
mysql.
I had a problem with a container which wouldn’t start due to a bad config change I made. I was able to copy the file out of the stopped container and edit it. something like: docker cp test-mysql:/etc/mysql/my.cnf . Edit it and copy back docker cp my.cnf test-mysql:/etc/mysql/my.cnf docker start mysql docker exec -ti mysql […]
Posted on January 21, 2020, 1:18 pm, by admin, under
git.
git reset –hard origin/master
Posted on January 20, 2020, 12:42 pm, by admin, under
apache.
Step 1 – Dockerfile FROM debian:jessie MAINTAINER user@server.com RUN apt-get update RUN apt-get install -y vim RUN apt-get install -y apache2 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server RUN apt-get install -y php5 RUN apt-get install php5-mysql RUN apt-get autoremove ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_LOCK_DIR /var/lock/apache2 ENV APACHE_PID_FILE /var/run/apache2.pid […]
Posted on January 15, 2020, 5:02 pm, by admin, under
linux.
Mounting mkdir ~/remoteDir ssh-keygen -t rsa ssh-copy-id -i .ssh/id_rsa.pub user@hostname sudo apt install sshfs sshfs user@hostname:/ ~/remoteDir Unmounting fusermount -u ~/remoteDir
Posted on January 15, 2020, 11:04 am, by admin, under
linux.