Remove Files older than x days in Linux
I have needed to delete the logs generated by Sarg, an Squid Log Analyzer, but only the Diary logs once the Month report was generated. To delete the logs older than 35 days I write a file in /etc/cron.weekly with the execute permissions and the following content: find /var/www/squid-reports/Diary -maxdepth 1 -mtime +35 -name ‘[0-9][0-9]*’ [...]
Open links spotify linux gnome native client
To open the links execute these commands: gconftool-2 -t string -s /desktop/gnome/url-handlers/spotify/command “/usr/bin/spotify -uri %s” gconftool-2 -t bool -s /desktop/gnome/url-handlers/spotify/needs_terminal false gconftool-2 -t bool -s /desktop/gnome/url-handlers/spotify/enabled true
Generate xorg.conf in Ubuntu
One of the changes from the Ubuntu 9.10 is that xorg.conf is missing. If we need to use some hidden options you must have the configuration file. In order to generate xorg.conf, we must do this: $ sudo service gdm stop $ sudo Xorg -configure The last command generate a file in <home>/xorg.conf.new We can [...]
optimize mysql database command
To optimize one database in a remote server we use the following command: mysqlcheck -u root -p –auto-repair –check –optimize -h <remoteServer> <database> To optimize all the databases mysqlcheck -u root -p –auto-repair –check –optimize –all-databases -h <remoteServer>
spotify at ubuntu 9.10 with wine
The sound in wine has some problems in Ubuntu 9.10, first of all because the advised configuration in spotify page doesn’t work always. After reading some information I solved the problem in ubuntu and kubuntu. In Kubuntu it works fine with the default configuration, but not in ubuntu, mainly because of the sound daemon by [...]
Errors in vbs
Here an example to remember the errors treatment in vbs. The script simply copy a file from a place to another. On Error Resume Next Err.Clear oFSO.CopyFile oFile, “e:\system volume information\test.txt” if err.number > 0 then WScript.Echo Err.Description On Error Goto 0
copy remote files linux with scp
If you want to copy files between two computers in linux, you must do: scp -Cr ‘user’@remoteComputer:/home/user/* /home/user/ If there is a domain, ‘user’ can be ‘DOMAIN\user’
xestores documentais
A continuación vou nombrar algún xestor documental (ECM), máis que nada para ter consciencia deste tipo de ferramentas tan imprescindibles e necesarias hoxe en día, e que tan pouco se empregan. Alfresco Knowledgetree Nuxeo OpenKM
proxy inverso con Apache
Interesante aportación a nivel de instalación en ubuntu dun proxy inverso redirixindo un cartafol en apache 2.0 Esta é a páxina du susodito, que copio e pego por se ocaso: El problema es sencillo de enunciar, pero no tan facil de resolver. Tengo un servidor A con IP pública,al que puedo editar sus archivos de [...]
DNS testing: namebench
Test the principal DNS’s is very important for an organization to accelerate the response of the internet requests. If we want to test who are the best DNS’s to put in our clients, there is a program named namebench from google code. It tests the local, and remote DNS’s. You can enter the IP of [...]
