RSS

Category Archives: Bilgisayar

Linux’ta Dosyaları büyüklüğe göre sıralamak

Bulunduğunuz dizindeki dosyaları ve klasörleri(alt klasörler dahil) büyüklüğüne göre sıralamak için aşagıkaki komutu kullanabilirsiniz.

du -s * | sort -nr | cut -f2- | xargs du -hs

 

Posted by on 24 Ağustos 2014 in Bilgisayar, Linux

Leave a comment

DBERROR db4: /var/lib/imap/deliver.db: unexpected file type or format

Problem:

Aug 23 17:37:50 localhost master[16716]: about to exec /usr/lib/cyrus-imapd/lmtpd
Aug 23 17:37:50 localhost lmtpunix[16716]: executed
Aug 23 17:37:50 localhost lmtpunix[16716]: DBERROR db4: /var/lib/imap/deliver.db: unexpected file type or format
Aug 23 17:37:50 localhost lmtpunix[16716]: DBERROR: opening /var/lib/imap/deliver.db: Invalid argument
Aug 23 17:37:50 localhost lmtpunix[16716]: DBERROR: opening /var/lib/imap/deliver.db: cyrusdb error
Aug 23 17:37:50 localhost lmtpunix[16716]: FATAL: lmtpd: unable to init duplicate delivery database
Aug 23 17:37:50 localhost master[3545]: process 16716 exited, status 75
Aug 23 17:37:50 localhost master[3545]: service lmtpunix pid 16716 in READY state: terminated abnormally

 

Solution:

# service cyrus-imapd stop
# rm /var/lib/imap/tls_sessions.db*
# rm /var/lib/imap/deliver.db*
# rm /var/lib/imap/db/*
# service cyrus-imapd start

Arama Terimleri:

 

Posted by on 23 Ağustos 2014 in Bilgisayar, Linux, Server

Leave a comment

Speed Up Cydia – Remove Cydia ads

SSH into your iDevice and browse to /Applications/Cydia/ and create two copies of package.js computer ( one is your backup and you will edit the other one ) .
Inside that file search for
var depiction = package.depiction
. Edit that line so that
depiction = package.depiction
will become
depiction = null
Now save the file and copy it back to /Applications/Cydia/ , overwriting the original one. Thats it. Now restart Cydia and enjoy.

 

Posted by on 23 Ağustos 2014 in Bilgisayar

Leave a comment

Compress MysqlDump Output

      Making backup

all databases

    :

mysqldump -u root -p --all-databases > dump.sql

      Making backup only

one database

    :

mysqldump -u root -p --databases db1 > dump.sql

      Making backup

many databases

    :

mysqldump -u root -p --databases db1 db2 db... > dump.sql

      Making backup with

triggers

    :

mysqldump -u root -p --triggers --all-databases > dump.sql

    Making backup with

procedures and functions:

mysqldump -u root -p --routines --all-databases > dump.sql

    Now let’s compress our dump in real time with

gzip:

mysqldump -u root -p --all-databases | gzip > dump.sql.gz

    We can still reach a higher compression ratio using the

bzip2:

mysqldump -u root -p --all-databases | bzip2 > dump.sql.bz2

Making a comparison between the dump with three compression options (none, gzip and bzip2) had the following result:

    Dump normal – 947k
    Dump com gzip – 297k
    Dump com bzip2 – 205k

And how do I restore the dump?

Normal:

mysql -u root -p < dump.sql

gzip:

gunzip < dump.sql.gz | mysql -u root -p

bzip2:

bunzip2 < dump.sql.bz2 | mysql -u root -p

Arama Terimleri:

 

Posted by on 18 Ağustos 2014 in Bilgisayar, SQL

Leave a comment

Unzip: skipping filename.zip need PK compat. v4.6 (can do v2.1)

Sometimes extracting a zip file using the unzip command may result in the “skipping: filename.zip  need PK compat. v4.5″ error message.

# unzip filename.zip
Archive:  filename.zip
   skipping: filename.zip  need PK compat. v4.6 (can do v2.1)

This is due to the file been compressed with the latest version of PKZIP which the unzip command cannot handle. The solution is to install p7zip package which can handle the files compressed using PKZIP.

Download the latest version of p7zip:

# wget http://downloads.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_x86_linux_bin.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fp7zip%2Ffiles%2Fp7zip%2F9.20.1%2Fp7zip_9.20.1_x86_linux_bin.tar.bz2%2Fdownload&ts=1390605043&use_mirror=garr

Extract the file

# tar -jxf p7zip_9.20.1_x86_linux_bin.tar.bz2

goto the extracted directory and run the installer

# ./install.sh

This will install the ’7za’ command on your server using which the zip file can be extracted

# 7za x filename.zip
 Processing archive: filename.zip
 Extracting  filename
 Everything is Ok

Arama Terimleri:

 

Posted by on 25 Ocak 2014 in Bilgisayar, Linux, Server

Leave a comment