Firefox + Adblock Plus + Java Plugin Crash Problem Solution

At last, my firefox setup is perfected: (Source: https://adblockplus.org/forum/viewtopic.php?t=4422)

This issue was SOLVED here,
comment #6 at https://bugzilla.mozilla.org/show_bug.cgi?id=501173#c6.

Change the plugin firefox uses for java, from libjavaplugin_oji.so to libnpjp2.so.
Done.

For a system wide change:

Code: Select all
# rm /usr/lib/firefox/plugins/libjavaplugin_oji.so# ln -s /usr/lib/java/jre/lib/i386/libnpjp2.so /usr/lib/firefox/plugins/
Tagged , , | Leave a comment

Unix Terminal shortcuts

On Unix-like systems, most of us use shell to do much of daily tasks, and we use terminal to issue commands.
These terminals may be from a Unix system such as gnome-terminal, Konsol or througt MS-WINDOWS such as butty or F-Secure.
This article is to enhance your productivity while using termianl by providing you with shourtcuts to access some features, and here’s these shortcuts:

CTRL+c : close the current line and moves you to the start of the prompt.
CTRL+a : moves you to the start of the current line
CTRL+e : moves you to the end of the current line
CTRL+d : delete the character under cursor
CTRL+r : allows you to search history for a command while typing
CTRL+j : the same as pressing the Enter key
CTRL+k : delete text until the end of the line
CTRL+l : equals issuing the ‘clear’ command
CTRL+z : suspend the current job
CTRL+w : removes words from the screen and history as well
CTRL+INSERT : copy the selected text
SHIFT+INSERT : paste the copied
ESC+backspace : remove characters starting from the character under the cursor backword until first space character
ESC+d : remove characters starting from the character under the cursor forward to the first space character
ESC+l : jumps your cursor forward to the first space character
ESC+b : jumps your cursor back to the first space character

please if any knows more, put in the comment.

Tagged | Leave a comment

Secure Copy (scp)

If you want to copy files between two Unix-Like Hosts in the same network, use this amazing command:

scp file_name mhewedy@compu10:~/work/

where :
file_name : is the file to copy
mhewedy@compu10:~/work/ the directory to copy the files to, indicating the machine name and the account.

Tagged , , | Leave a comment

Revert back to ubuntu usplash theme

sudo dpkg-reconfigure usplash-theme-ubuntu

Tagged | Leave a comment

Searching for a string inside multiple files and output the name of the files containing that string

find . -name “*” | grep -i ecomm | xargs ls -las | grep “Aug 27” | awk ‘{print $10}’ | xargs grep -i string_to_search_for | grep -i “\.log” | awk ‘{print $1}’

where:

“ecomm” is part of the name of the file in which we should search for the string
“Aug 27” is the date the files were last modified
“$10” is the last column resulting from the “ls -las” command, this is the column containing the filename (the string is not searched for yet)
“string_to_search_for” the name is obvious 🙂
“\.log” all the files end with “.log”
“$1” is the filename containing the string

There are still two problems left (I don’t have time right now to solve them):
  1. All the filenames end with the “:” character, it needs to be omitted
  2. Filenames are redundant, i.e. each file is repeated many times

Update: Problem number 2 solved using the “sort” and “uniq” commands which sort the results and then omit the repeated results, here is an example:

find . -name “*” | grep -i ecomm | xargs ls -las | grep “Aug 31” | awk ‘{print $10}’ | xargs grep -i mbassiouny | grep -i “\.log” | awk ‘{print $1}’ | sort | uniq

Tagged , | Leave a comment