I will write some useful commands to work with Docker. If I use them often, I will remember them, otherwise I will remember them quickly if I read this post.
(read more...)I will write some useful commands to work with Docker. If I use them often, I will remember them, otherwise I will remember them quickly if I read this post.
(read more...)I am tired to look for Vi shortcuts, let the copy of this content stay here. Press Esc to start waiting for the command and after that enter the action.
$ vi <filename>
— Open or edit a file.i
— Switch to Insert mode.:w
— Save and continue editing.:wq
or ZZ
— Save and quit/exit vi.:q!
— Quit vi and do not save changes.yy
— Yank (copy) a line of text.p
— Paste a line of yanked text below the current line.o
— Open a new line under the current line.O
— Open a new line above the current line.A
— Append to the end of the line.a
— Append after the cursor’s current position.I
— Insert text at the beginning of the current line.b
— Go to the beginning of the word.e
— Go to the end of the word.x
— Delete a single character.dd
— Delete an entire line.Xdd
— Delete X number of lines.Xyy
— Yank X number of lines.G
— Go to the last line in a file.XG
— Go to line X in a file.gg
— Go to the first line in a file.:num
— Display the current line’s line number.h
— Move left one character.j
— Move down one line.k
— Move up one line.l
— Move right one character.In Linux OS (Debian, Ubuntu, CentOs) log files of web server can grow and grow. According to web server activity, they can grow to a very big size. To remove files is a bad solution because they won't be restored and you loose new logs.
To reset MySQL root password you should log in as root to your Linux server, stop MySQL service, start it without password and permission checks, log in as root without authorization, update password and restart MySQL server. Now more info.
When I first started Putty on my Windows 8.1 x64, connected to my server and ran Midnight Commander, I saw picture like this (see drawing 1). Instead of separating lines there were unreadable characters. It wasn't what I expected to see and the first thing came in my mind is to fix it. (read more...)