Posted on November 12, 2008 by linuxconfig
Search engine is very powerful tool but not just for search but also for beginner hacking. Some mysqladmin web tools are indexed with google which make them available for search. By searching with keywords:
“phpMyAdmin” “running on” inurl:”main.php” site:com
“phpMyAdmin” “running on” inurl:”main.php” site:org
or
“phpMyAdmin” “running on” inurl:”main.php” site:net
etc.
we can get a results for all google indexed mysqladmin. Since not all of them are secured by the password you can get lucky and find some which are free to use.
Filed under: Fun and Linux | Tagged: google, mysql, search engine | Leave a Comment »
Posted on November 2, 2008 by linuxconfig
Here is a simple example on how to display date/watch with simple bash command:
$ while true; do clear; date; sleep 1; done
Filed under: Administration, Bash, Commands, Linux, Scripting | Tagged: Bash, command line, Linux | Leave a Comment »
Posted on October 19, 2008 by linuxconfig
We all know how to list non-hidden and hidden files with ls command on shell. However I could not find out how to list only hidden files ( starting with “.” ) with only ls command. One, but not complete solution could by to using TAB key. For example ls . and pressing 2xTAB will display only hidden files. It seem that we need to call for help grep command:
ls -a mydir/ | grep '^\.'
If anyone knows how to do this trick with only ls command please let me know.
Filed under: Commands, Linux | Tagged: command line | 1 Comment »
Posted on October 19, 2008 by linuxconfig
I always keep forgetting this bash syntax redirection. This is because of my short memory and also because I do not use it often. In many cases we need to remove a STDERR from the command output and keep only STDOUT. On the other hand there are times that we want to see STDERR and remove STDOUT. Here is how to do it:
$ BASH-COMMAND 2>&1 > /dev/null
Filed under: Administration, Bash, Linux, Scripting | Tagged: bash syntax | Leave a Comment »
Posted on October 6, 2008 by linuxconfig
I have been using my current kubuntu installation for many months already and I never had a problem with my nvidia driver settings except today. From no apparent reason I have started my linux box and my default and maximum resolution was 1024×768 instead my standard 1680×1050. I have tried reinstall envy packages, doing dpkg-reconfigure xserver-xorg and nothing helped.
Only what helped what that I manually configured xorg.conf file and changed from:
SubSection "Display"
Depth 24
EndSubSection
to:
SubSection "Display"
Depth 24
Modes "1680x1050"
EndSubSection
This solution is still mistery to me. May someone know the answer to this riddle please let me know.
System: Kubuntu Hardy, Nvidia 8800 Ultra
Filed under: Administration, KDE, Linux | Leave a Comment »
Posted on September 3, 2008 by linuxconfig
If from some reason you need to recreate networking udev z25 rules file you would use the following cammed to achieve that:
/lib/udev/write_net_rules all_interfaces
this will recreate a z25_persistent-net.rules and include all interfaces.
Filed under: Administration, Debian, Linux | Tagged: Debian, networking, udev | Leave a Comment »
Posted on August 10, 2008 by linuxconfig
ls -R will list all files recursively. The output of such a command will produce a output containing not only a files but also full path the the each file or directory. One way to clean this output is to use grep and invert selection with -v option. Each path from ls -R command contains “:” symbol and we can use grep command to invert selection based on “:” :
ls -R | grep -v :
this will list all files and directories only. However output will still produce a empty lines. This can be again removed by -v where we invert selection and remove all empty lines ^$
ls -R | grep -v | grep -v ^$
Filed under: Administration, Commands, Linux | Leave a Comment »
Posted on July 24, 2008 by linuxconfig
This error message took me lots of effort and time to solve it. The problem is that before storing binary data strings in the postgresql database the binary strings need to be escaped before storing them. There is on the google available subroutine for per which is doing this job. It is called escape_bytea. Anyway here is a whole script on how to store and retrieve binary data with perl form PostgreSQL database.
the other solution which a have not tried yet is to encode them with
Base64 Encoder Decoder
http://perldoc.perl.org/MIME/Base64.html
Filed under: Administration, Database, Debian, Perl | Tagged: binary data, encoding, error, how, Perl, postgresql, retrieve, storeage, unicode, utf8 | Leave a Comment »
Posted on June 17, 2008 by linuxconfig
Here is a very nice vim / vi text editor tutorial for beginnes as well as for more advanced users. Its very easy to follow as it has flash video attached to every section. vi editor tutorial
Filed under: Administration, Fun and Linux, Linux | Leave a Comment »
Posted on June 13, 2008 by linuxconfig
Sometimes you encounter situation when you need a perl module to support your program but perl module is not available from standard linux repositories. Installing perl module from source code is not always good idea so what would be the best is to create package for a particular module using dh-make-perl command. In my case I was missing a poerl module Linux::Usermod and here is what I did:
apt-get install dh-make-perl
dh-make-perl –build –cpan Linux::Usermod
You will need to answer some simple questions if you are running cpan for a first time. At the end dh-make-perl will spit out a debian package and in my case it was: liblinux-usermod-perl_0.69-1_all.deb. All I need to do now is to just use dpkg to install this package:
dpkg -i liblinux-usermod-perl_0.69-1_all.deb
This is nice and clen way of dealing with missing perl packages since its also easy to uninstall it once its not needed.
Filed under: Administration, Debian, Linux, Perl, Ubuntu | Leave a Comment »