change console resolution in linux
Do the following to change the console resolution: 1. Determine available resolutions To do this, at the GRUB menu, press 'c' At the GRUB prompt type: grub> set pager=1 grub>…
PostgreSQL: ERROR: permission denied to reassign objects
When reassigning all database objects to a new owner in PostgreSQL you might get this error: mydb=> REASSIGN OWNED BY admin TO new_admin; ERROR: permission denied to reassign objects This…
flush deferred messages in mail queue
In Exim: # exim -qff In Postfix: # postfix flush In Sendmail: # sendmail -q -v
how to shrink a linux partition used by LVM
To shrink a linux partition, any common tool like gparted can be used. In case the partition is currently being used by LVM, some previous steps should be performed. Assuming…
move IMAP messages from one server to another
Use larch to migrate the data stored in a user's IMAP account. To install it on Debian/Ubuntu: # apt-get install larch When executing larch, it will prompt the source and…
git basic commands
List differences between versions of a file Differences in content between the working directory and the staging area: $ git diff Differences in content between the last commit and the…
subversion basic commands
Create a repository in /home/svn $ svnadmin create --fs-type fsfs /home/svn Import an existing project located in /soft/project into the newly created repository $ svn import /soft/project/ file:///home/svn/project/trunk -m 'Initial…
find location of database files
MySQL 1. Connect to the mysql console: # mysql -p 2. Look the value of 'datadir' variable to find the location of database files: mysql> SHOW VARIABLES WHERE Variable_Name =…
mysql: change a user’s password
1. Login to mysql server with a user with enough privileges (usually root) $ mysql -u root -p 2. Select the database 'mysql' mysql> use mysql; 3. Modify the password…
postfix: analyse logs using pflogsumm
pflogsumm is a great tool to quickly analyse Postfix log files. To install it: // Debian based distros # apt get install pflogsumm You can also it directly from the…