Install PHP MongoDB (mongo) Driver on Linux, Mac OS X, Windows, UNIX, BSD

PHP MongoDB (Mongo Database) Driver Installation on Linux, UNIX, BSD and Mac OS X MongoDB PHP driver is very simple install on Linux, UNIX, BSD and Mac OS X. You need just PEAR (PHP Extension and Application Repository) with PECL repository. Normally PHP development (dev) package and PHP Pear package installation from package management system is enough to get PEAR working. Also go-pear.php script can be used. Check that the PEAR and PECL are working with the following commands:
Read more →

Linux: Enable Laptop Touchpad Vertical Scrolling and Tapping from Command Line

I noticed that the Fedora Linux with KDE desktop, has reasonably poor support for laptop touchpad adjustment. For example, the KDE > System Settings > Keyboard & Mouse > Mouse options will not be able to enable vertical scrolling and touchpad tapping. So I decided to write this short guide, howto enable Touchpad vertical scrolling and tapping from command line without any GUI. Enable Laptop Touchpad Vertical Scrolling Simply write following on command line:
Read more →

VirtualBox 7.0.8 on Fedora 38/37/36, CentOS/RHEL 9/8/7

Oracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software. Check video guide howto install VirtualBox 7.0.8 on Fedora 38/37/36 using Oracle’s own dnf repo: Check video guide howto install VirtualBox 7.0.8 / 7.
Read more →

Linux: Create Text File on Linux Shell / Command Line

This is a very typical case, the need to create a temp file on the command line quickly. Opening editor, writing content, save file and quit editor is not the fastest possible way. A faster way is to use the cat command with the name of the file and write contents of the file and give the end-of-file character (Ctrl-D). This is guide, howto create (or append to) text file without text editor on Linux shell / command line.
Read more →

Linux locate command: Find Files and Directories Quickly and Efficiently

This is quick guide howto find files and directories quick and efficiently on Linux with locate command. Linux find command is outdated, slow and complicated to use, so locate command is much better option. Locate basic usage find files and directories locate file # example locate httpd.conf locate path # example locate /X11/ Find (locate) ignore-case (not case sensitive) locate -i file # example locate -i netbeans Find (locate) only file name (basename) locate -b file # example locate -b shadow Limit locate output locate -l 100 file # example locate -l 50 conf Print number of found entries locate -c file # example locate -c conf Find (locate) with full file info Simply locate something and pipe output to ls command.
Read more →

Add Hostname, Date, Time, Uptime, Load Average to Linux Terminal Title

This tip is really useful if you need/want to monitor multiple servers at the same time. This Tip works, as the tip, by which you can add the date and time the title of the Linux terminal, but it adds more usefull info to terminal title. Following bash one liner add hostname, date, time, uptime, users and load Average to Linux Terminal Title and updates it every second. This trick works at least following terminals: Gnome Terminal, xterm, urxvt, rxvt.
Read more →

PHP CLI Colors – PHP Class Command Line Colors (bash)

PHP Command Line Interface (CLI) has not built-in coloring for script output, like example Perl language has (perldoc.perl.org/Term/ANSIColor.html). So I decided to make own class for adding colors on PHP CLI output. This class works only Bash shells. This class is easy to use. Just create new instance of class and call getColoredString function with string and foreground color and/or background color. PHP Class for Coloring PHP Command Line (CLI) Scripts Output <?
Read more →

Delete files permanently with shred command in Linux – Remove absolutely

Sometimes we need to delete files which content should disappear absolutely, completely and safely. Linux command rm just remove file and it’s still possible to dig out from the disk. Fortunately for Linux can be found in shred program that removes the files permanently. Shred command is easy and quickly to use cases when files need to deleted forever. Shred command usage Create test file: echo "testing testing" > /tmp/test.
Read more →

Google search from Linux and UNIX command line

Today I started thinking that how cool is do some Google searches straight from command line. First I try to find some ready tricks from the Internet, but I couldn’t find quickly anything good. So I decide do a simple Bash function that can take Google search as parameter and open Firefox Browser (tab) with Google search. Sounds easy… :) First we need Google search URL without search parameter and it looks like this:
Read more →

Linux Tip: How to handle a files with a dash as first character from command line

Sometimes you maybe have to handle files with a dash (-) as first character from Linux command line. It can be difficult, because the script “thinks” the marks after the dash are parameters. So files which name begins with dash (-) can not be dealt with directly by typing the command and the file name, such as the following: less -file-with-a-dash-as-first-character Files which name begins with dash (-) can be used as follows:
Read more →

Calendar (cal) on Linux command line

Sometimes it feels that many of the excellent and convenient command-line tools is forgotten, when they are replaced by graphical tools. A good example is the cal program, which is a command-line calendar to Linux and UNIX. It displays a simple calendar in text format. Cal usage Displays current month calendar on console cal Output: October 2009 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Displays selected month and year calendar on console cal 11 2012 Output:
Read more →

Nano Text Editor and nanorc Tips and Tricks

Nano is easy to use and lightweight command line text editor for Linux and UNIX systems. Nano text editor can use either the default settings or improve settings with customized nanorc-file. Here are some tips that can improve the usability of Nano. Changes can be made to nanorc file, either locally or to all users or options can be used as command line options. First is good to check Nano compiled options, with command:
Read more →
Subscribe and follow: