Cik daudz aizņem mana mapīte
By Sandis on Oct 25, 2010 in Telecom | Comments Off
Iet runa par cilvēkiem :) Gribas redzēt MB, GB utt.
du –max-depth=1 -h -x -c
By Sandis on Oct 25, 2010 in Telecom | Comments Off
Iet runa par cilvēkiem :) Gribas redzēt MB, GB utt.
du –max-depth=1 -h -x -c
By Sandis on Oct 23, 2010 in Telecom | Comments Off
php -i | grep php.ini
[root@mafia ~]# php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
[root@mafia ~]#
By Sandis on Aug 20, 2010 in Linux | Comments Off
You can copy MySQL database from one LINUX server to another LINUX server using ssh or mysql client, but…
I recommend this Linux console program / Putty command (works on Linux platforms):
$ mysqldump -u username -p'password' old-db-name | ssh user@remote-server mysql -u username -p'password new-db-name
Remote MYSQL copy details
You can run all the above 3 commands in one pass using mysqldump and mysql commands. (WARNING! This is insecure method, use only if you are using VPN or trust your network):
$ mysqldump old-db-name | mysql -h remote-server new-db-name
Use ssh if you don’t have direct access to remote mysql server (secure method):
$ mysqldump old-db-name | ssh user@remote-server mysql new-db-name
OR
$ mysqldump -u username -p'password' old-db-name | ssh user@remote-server mysql -u username -ppassword new-db-name
You can just copy table called foo to remote database (and remote mysql server remote.box.com) called bar using same syntax:
$ mysqldump old-db-name foo | ssh user@remote-server mysql bar
OR
$ mysqldump -u user -p'password' db-name foo | ssh user@remote-server mysql -u user -p'password' db-name foo
This will not just save your time but you can impress your friend too ;). Almost all commands can be run using pipes under UNIX/Linux oses.
By Sandis on Aug 20, 2010 in Linux | Comments Off
debian:/# ls -lat /home/scripts/mysql_backup.sh
-rw-r–r– 1 root root 2333 2010-08-20 13:25 /home/scripts/mysql_backup.sh
debian:/# chmod +x /home/scripts/mysql_backup.sh
By Sandis on Aug 1, 2010 in Telecom | Comments Off
Situācija ar MySQL datubāzes importu
Paskaidrojumi
By Sandis on Jul 29, 2010 in Telecom | Comments Off
Reizem vajag uzzināt, cik lielas ir www apaķšdirektorijas, tai uzzinātu izmantojam komandu du -h –max-depth=1
ja vajag noteikt direktorija lielumu, lietojam du -h –max-depth=1 direktorijas-nosaukums
Izmantotie: putty, gentoo, linux os