Archive for the ‘Linux Tips’ Category

Linux Tip #9: Create multiple folder or files

Sometime it’s necessary for you to create multiple folders or files. This is normally the case for me when I’m working with the clusters at my work place. Fortunately, In Linux this is easy.
Using the “for loop”, one could easily put together a one-liner to see results. See sample below.
The initial “ls” shows that the [...]

Linux Tip #8: grep with color

If you’re running grep on a large file with multipled results, highlighting your results would really easy on your eyes.
Here’s how;
Export the “GREP_OPTIONS” environment variable to include “–color=auto”. Run the export command below.
export GREP_OPTIONS=’–color=auto’
Once you’ve executed the command, run a simple grep to see the highlights in action.
Red is the default highlight color. I’ll cover [...]

Linux Tip #7: Disable auto logout in C Shell (csh)

Run the “set autologout=[n]” command to enable or disable the autologout feature in C Shell (csh)
Setting autologout to “0″ will disable the autologout feature.
set autologout=0
The first line below will set the autologout period to 1 minute and the second line will be 5 minutes. If there is no activity for the set time, you will [...]

Linux Tip #6: Download with cURL

Here’s how to download a file using cURL.
curl -O [full url to file]
curl -O http://downloads.wordpress.org/plugin/simple-tags.1.6.6.zip
Sample Output;
[root@kmon01 bin]# curl -O http://downloads.wordpress.org/plugin/simple-tags.1.6.6.zip
% Total % Received % Xferd Average Speed Time Time Time Current
[...]

Linux Tip #5: Reload you /etc/inittab file

You made changes to your /etc/inittab file but can’t effort any downtime.
There’s a simple trick to reload and apply changes in your /etc/inittab file without a reboot.
Run “init q” or “init Q”
[root@snoopy ~]# init q
[root@snoopy ~]#
[root@snoopy ~]# init Q
[root@snoopy ~]#

Page 1 of 212»
© 2008-2009 The Danesh Project
Powered by Wordpress and made by Guerrilla. Best viewed in Mozilla Firefox