Tuesday, May 31, 2011

ArchiCAD Tutorials - Conserve's efforts, and a little more productive with a range Favorites

I am sure you are very aware of a pipette and how they can helpyou duplicate the settings for the object, they are similar to your target to be considered. Of course nothing is, but if you start anew project. It's just too much time to prepare things like waste. Ifyou look at the setup to get things done faster, you'll find afavorite is very helpful.

Open an existing project and go to Window menu - Palettes - Favorites. A palette will from expanded with a simple text interface. May you find a default list of favorites before you. You can clear any unwanted favorites by going to the popup menu and choosing "Delete" from the top right corner.

It's easy to save an element as a favorite, simply select it and save. Use the "Save Current Selection" option from the popup menu, give it a name. Name is using descriptive detail to remember it Easier. You'll find the easy "Rename Favorite" command in the top right popup menu in case you need it.Repeat the select and save the process with additional walls, Quickly and you'll have a list of installments standard wall types in the Favorites palette. They will of sort alphabetically by name.You'll find any designs you've already finished cans make useful parts for later.

People have found it possible to make this in 3 Dimensions, if Could you believe it! Navigate your mouse to the window or door You Want to select in 3D. You can put in relevant information into the name. This will of make it easy to pick from the text list.

Pls That You'll notice the window is the active tool in the Toolbox, you'll only see windows favorites listed. If you Would like to view all the Favorites, activate the Arrow tool on your screen.

Having a well developed project will from allow you to create a very complete list of Favorite Elements Quickly and Easily. Click "Save the Current Default Settings" with the eyedropper to speed up the process of making your list. This will of Save the settings of the element That was just eyedropped. You can save new favorites Quickly by using the shortcut key for the Eyedropper Tool, Option key in Mac and ALT in Windows. You can build up a large list of favorites Within A Few minutes this way.

This list will of stay with the project, so Pls you save the project and reopen it, it will of be there. Favorites To put these into another project for use, Save Them using the popup command, "Save Favorites". Name the list something remember-able. You'll have options to choose saving the folder as well the which lets you stay organized Easily. The file extension That you be saving it in earnest is Called *. PRF, likely, meaning PREFERENCES.

Now you have the option of loading your Favorites Pallet in any project. In your project, just click the Load Favorites from the popup menu. Next you'll have the choice of Either replacing or merging together the list of Favorites.

Using these favorites you cans Quickly draw the building shell.Double click on an exterior wall the favorite to activate it. When you are ready to move onto the interior walls, you'll notice That your favorites will from automatically sets the correct layers and settings.

You May Also Decide to change Things later. Using the favorites tool, you cans do that instantly. Select as many walls as you'd like to change and double click on the favorite Would you like to apply. They are all updated instantly.

You can go through the design process with much more Quickly Favorites - simply select a favorite door, and place the doors, activate a favorite window, place the windows, and so on.

You can use the 3D view or 2D view to switch objects. While in 3D view, you cans switch the properties of individual walls, Such as material, by loading up your favorites. Select as many windows as you wish and load the new favorite. Suddenly They will of all be updated at once, saving you a great deal of time.

Note That once you've put in elements using a favorite, They are not linked to it. You can change the elements as you like. Using the Favorites will of speed up the process of Placing and modifying objects. They do not limit you in any way or Prevent you from making changes.

Additional Study ArchiCAD ArchiCAD Tips on my journal article, http://www.Bobrow.com. You'll find ArchiCAD Training videos and articles to support you to conserve time and finish projects more Quickly.

Article Source: http://EzineArticles.com/?expert=Albert_Roth

Saturday, May 21, 2011

Mac Anti Virus - How to Secure Your Mac OS and Get Rid of the Latest Trojan

With Anti-Virus for Mac systems is not uncommon, either. Until a few years, Mac malware-viruses, adware and other malicious objects were almost impossible to find, but now hackers target the Mac operating system very aggressive. 

Recently we heard about a new Trojan horse that tried to attack a number of good or Mac systems. This Trojan attempts to alert the user to purchase a fake anti-virus for Mac users think that by his system was infected by the malware stuff. Since this malware installed open several porn sites and you get pop-ups to the latest version of the software so that information from your credit card may be recorded update. Although one good thing about this Trojan horse was that it was not the installation itself was a lot of Mac users a victim of this malware 

Get rid of this Trojan 

It is also known as defenders Mac, Mac Security or a similar name. You can easily get rid of this malware, because it runs in the background and you are prompted to install it. It is easily removed by this procedure. 

Open to monitor the activity and find one of those names like Mac Security Mac advocates, etc. 
Select it and click "End Process" or select "force-quit" if necessary. 
Go to the download / Application folder and locate the installation file. Move this file to the Trash, then empty the Trash. 
Go to the account and select "System Preferences. Also delete all instances of the Trojan horse of the connection tag. 
A few simple tips to help secure your Mac 

While Apple makes a point to open files only safe, but the system can not really judge whether the file. It is best to disable this feature by disabling this function within the parameters of Safari. 
Another important point to keep in mind that if you use the Internet, various programs are downloaded automatically. There is always a good practice to manually install any new program.This trick is useful not only for Mac systems, but also for Windows to some extent. 
Anti-Adware, Anti-virus and other Internet security tools are available for Mac, so better have a good antivirus Mac, Internet protection tool for Mac from a trusted brand, so that your installation system is always protected. 
Learn more about some of the best anti-virus tools Mac if you're a Mac user. Get the best anti-virus for Mac before it is too late.

Saturday, May 14, 2011

PDF editor for manipulating PDF on LINUX

Adobe Acrobat is a commercial tool for manipulating PDFfiles. I used CUPS - Printing system export PDF files. I also tried gv for the same purpose. However, I had to complete theprocessing of PDF documents. My research ended with the software pdfedit free and open source editor for manipulatingPDF documents. The software GUI and CLI (command line)interface.

This software also supports scripting and almost anything can be scripted. PDFedit is a low-level tool for users. You can use this software:
=> To write / create / edit PDF files.
=> Print PDF files.
=> Save PDF files.
=> Export PDF files to XML etc.

Install PDFEdit

If you are using Debian or Ubuntu Linux, enter:
$ sudo apt-get install pdfedit

Start Editing PDF Files with PDFEdit editor

To start PDFEdit, type:
$ pdfedit /path/to/pdf.file &
$ pdfedit &

PDFEdit Linux freeware pdf writer software
( Fig 01: PDFedit ~ Linux PDF maker in action [click to enlarge the image] )

Other Linux pdf maker / writer software

During my research I came across other apps to edit PDFs. I hope you will find following tools useful:

=> scribus - Open Source Desktop Page Layout / desktop publishing (DTP) application software. It works under Linux, Mac and Windows computer. This software is another good alternative to PDFEdit. Just open file using open option and you can edit PDF file. You can install scribus using apt-get command:
$ sudo apt-get install scribus

To use scribus to edit PDF files:
Start scribus > New File > Insert > Image > Double click > Select PDF file

=> flpsed - a WYSIWYG pseudo PostScript editor. This software is very fast and light weight. To install flpsed, enter:
$ sudo apt-get install flpsed
To edit file, enter:
$ flpsed /path/to/pdf-file.pdf &

=> Gimp - I've also used gimp for editing pdf files. However, you need basic knowledge of gimp itself for editing pdf files. GIMP is almost installed on all Linux distribution. Please note that GIMP is not elegant solution for editing pdf files.

Online PDF manipulation tool

Finally, you can always use the Internet to modify PDF files using a web browser. [pdfescape.com]

Conclusion

PDFEdit is the best free open source software for for Linux / Unix-like operating systems. However, it does not support editing protected or encrypted PDF files.

Monday, May 9, 2011

the Best software Registry Repair

There are two features of the best registry cleaner look you need - you need tools to be able to find correct the error the most, and most reliable for your computer. Sneaky secret is that most registry repair tool designed, in fact, many of them amateur programmers who are not able to program and run / can be efficient reliable. Many of the instruments of lesser quality due to the fact there is also your operating system is much slower and with many problems, forcing the system worse than now. 

Reform of the best recording software is a simple tool to errors * real computer, you can also correct to reliable than others.Sounds simple right? Well, that's the truth that while this program seems simple, in fact very complicated under the hood. "Calls and why everything should be designed to cover a very important part of Windows," Register "is. This is a database, continue in the important election for your computer, and the burden of a large number of contributing major options. Registry is where Windows stores paper walls, passwords and other important features of the computer -. making it one of the most important part of the system to fix problems, you should be able to rectify the situation in one of the problems that can be most effective in the. 

Registry Repair Tool was developed by the study of all the settings on your computer and your Windows, then see the mistakes that could get inside. How to tell the best tool for the comparison between programs, most problems on your system without having to solve other errors. And how to determine the nature of the program is a program to be able to search the your computer and then remove the error that your system will be at home to compare. Currently there are about 3 registry cleaners that can determine the error in your computer, including: 

Registry Cleaner Front Line 
[PCTools Registry Mechanic 
Registry Booster 
Best Registry Repair Tool in our view, the so-called "Front Line Registry Cleaner" is. This tool was developed by a major software company in England that created in the creation of programs that are very effective to have to improve the speed and reliability of Windows experts. This program is not the only one to clean up the most mistakes, but quickly found the problem and make sure your computer can not solve the various problems that can be your system - improving the speed and reliability and as a result.

Monday, February 14, 2011

USB MODEM in Damn Small linux

1.Plug in the modem
2. in dmesg you will see a storage device added
3. do lsusb
4. Do modprobe usbserial vendor=xx product=xx (enter the numbers you found in lsusb, for mine it was 0x12d1 with 0x1300)
5. in dmesg you will see 2 serial ports were added (if not, or you only see one.. it might you you dont have usb 2 or your pc is to slow)
6. Put the wvdial.conf script below and make sure you have downloaded the wvdial.dsl file.
7. Start with wvdial hsdpa and you are online.

This information is for a telfort subscription! It took me a while to get the right wvdial.conf, but this should do it.

# wvdial for Vodacom Data. Created by Tazz_tux
# Version 1.0

# Change Log:
#
# Added support for HSDPA.
# Added Headers and version control.

[Dialer Defaults]
Phone = *99***1#
Username = internet
Password = internet
Stupid Mode = 1
Dial Command = ATDT

[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init5 = AT +CGDCONT=1,"IP","internet"
ISDN = 0
Modem Type = Analog Modem

Sunday, February 6, 2011

Instalasi OpenVPN Client in Linux

Install aplikasi GUI utuk client

# apt-get install kvpnc
# apt-get install network-manager-openvpn openvpn

Copy setting OpenVPN

# cp -Rf /usr/share/doc/openvpn/examples/easy-rsa/* /etc/openvpn/

Pada Ubuntu Hardy 8.04 tampaknya ada beberapa versi konfigurasi, kita dapat menggunakan salah satu dengan cara

# cp -Rf /etc/openvpn/2.0/* /etc/openvpn/

Selanjutnya lakukan langkah berikut, yang sama dengan versi lainnya

# cd /etc/openvpn
# mkdir /etc/openvpn/keys

Lakukan langkah berikut

# vi vars
# , ./vars
# ./clean-all

Atau copy file /etc/openvpn/vars dari Server. Copy key client dari Server

# scp -r root@192.168.0.3:/etc/openvpn/keys/ca.crt /etc/openvpn/keys
# scp -r root@192.168.0.3:/etc/openvpn/keys/user1.crt /etc/openvpn/keys
# scp -r root@192.168.0.3:/etc/openvpn/keys/user1.key /etc/openvpn/keys


Menjalankan VPN Client (client.conf from www.openvpn.org)

# openvpn --config /etc/openvpn/client.conf


Contoh Client.conf adalah sebagai berikut,

# vi /etc/openvpn/client.conf

isinya kurang lebih

# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client
# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
; dev tap
dev tun
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one.  On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
; dev-node MyTap 
# Are we connecting to a TCP or
# UDP server?  Use the same setting as
# on the server.
;proto tcp
proto udp 
# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
;remote my-server-1 1194
;remote my-server-2 1194
remote 192.168.0.3 1194
# Choose a random host from the remote
# list for load-balancing.  Otherwise
# try hosts in the order specified.
;remote-random
# Keep trying indefinitely to resolve the
# host name of the OpenVPN server.  Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite
# Most clients don't need to bind to
# a specific local port number.
nobind
# Try to preserve some state across restarts.
persist-key
persist-tun
# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here.  See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
# Wireless networks often produce a lot
# of duplicate packets.  Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings
# SSL/TLS parms.
# See the server config file for more
# description.  It's best to use
# a separate .crt/.key file pair
# for each client.  A single ca
# file can be used for all clients.
ca keys/ca.crt
cert keys/client.crt
key keys/client.key
# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to "server".  This is an
# important precaution to protect against
# a potential attack discussed here:
#  http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to "server".  The build-key-server
# script in the easy-rsa folder will do this.
;ns-cert-type server
# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1
# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x
;cipher AES-128-CBC
# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
; comp-lzo
# Set log file verbosity.
verb 3
# Silence repeating messages
;mute 20

 

Cara menjalankan VPN client dengan client.conf (from www.openvpn.org)

# openvpn --config /etc/openvpn/client.conf

Using network manager (nm-applet) in KDE4

As of now knetworkmanager is not available for KDE4, and those of us using NetworkManager are going to have to settle with gnome's version of the network manager applet: nm-applet

First of you need to install networkmanager, read more on that here.

Once it's installed you need to set it up to run as a daemon, i.e. add it to /etc/rc.conf, and remove network:

DAEMONS=(syslog-ng networkmanager netfs crond alsa hal fam kdm)

Furthermore you have to exclude the interfaces you intend to use with networkmanager (also in /etc/rc.conf e.g.:

INTERFACES=(!eth0 !wlan0)

When that's done you need to install gnome-network-manager

# pacman -S gnome-network-manager

Then add yourself to the network group:

# usermod -g network your_username

And that should do it, you can now run nm-applet as a normal user, and switch between wireless and wired network without modifying rc.conf every time.

Saturday, February 5, 2011

How to fix MBR in Vista And Windows XP

What is the MBR? MBR stands for Master Boot Record and it’s the first sector of your hard drive that basically tells the BIOS where to look for the operating system on your computer.

If, for any reason, the MBR becomes damaged or corrupt, then the operating system will be unable to load. You will normally see error messages like:

Error loading operating system

 

Missing operating system

Invalid partition table

These messages are definitely not fun, especially if you are not familiar with computers. Most people would automatically assume their computers are dead! However, that’s not true. Being in IT myself, these errors are actually preferably to other types of Windows errors. Why?

Well, it’s actually fairly easy to fix the Master Boot Record in XP and Vista. All you have to do is load up the Recovery Console and run a simple command. All of your data, applications, settings, etc are still intact on the drive and once the MBR is fixed, the computer will load normally.

So how can you repair your damaged MBR? Here are the steps to follow:

1. First, restart your computer with the Windows XP setup disk in the CD drive. If you don’t have your original disk, borrow one or download a ISO image from a torrent site.

2. When prompted, boot from the CD drive by pressing any key. If Windows loads automatically, you will first have to enter the BIOS setup and change the order of the boot devices to start with the CD drive.

change boot order

3. Once the setup loads, you will see the option to press R to repair a Windows installation.

repair windows

4. Once the Recovery Console loads up, you will have to type in a number that corresponds to your Windows installation. This is normally just 1. Press Enter and then type in the Administrator password.

recovery console

5. Now at the prompt, type in fixmbr. Your damaged MBR will now be replaced with a new master boot record and your computer should now be able to boot properly. Note that you may also want to run the fixboot command to repair the boot sector with a new one.

Also, make sure you only use these commands on a system with one operating system installed. If you have more than one operating system installed, fixmbr and fixboot could mess up everything.

Fix MBR in Vista

In Vista, the procedure to fix the master boot record is a bit different. You have to start up Vista in the Recovery Environment and then run the bootrec command. Here’s how.

1. First, load up the Windows Vista disc in your drive and press any key to boot from the disc.

2. Choose the language, time, currency, etc and click Next. Now click on Repair Your Computer.

repair computer vista

3. Choose the operating system to repair and click Next. When the System Recovery Options dialog comes up, choose the Command Prompt.

system recovery options

4. Now type bootrec.exe and press Enter. This will rebuild the boot configuration data and hopefully fix your problem. You can also run the command with switches to fix just the master boot record (/fixmbr), the boot sector (/fixboot), or rebuild the entire BCD (/rebuildbcd).

If you are still having trouble with loading Windows, post a comment and I’ll see if I can help! Enjoy!

How To Repair MBR And Boot Into Linux

There are times when you inadvertently overwrite your Master Boot Record. The end result being that you are unable to boot into Linux. This is especially true when you are dual booting between windows and Linux OSes. Once when I was working in Windows XP, I accidentally clicked the hibernate button instead of shutdown. And windows somehow overwrote my MBR which housed the GRUB boot loader. At such times, it pays to have this cool tip at hand.

This is what you do to restore the GRUB boot loader when faced with the above problem. First you need a Linux distribution CD. If you are using Fedora (RedHat) then the first CD is sufficient. But you may also use any of the live CDs like Knoppix, Ubuntu Live CD and so on.

With Fedora CD
Boot your computer with the first CD of Fedora in your CD drive (You have to enable your PC to boot from the cdrom, which you can set in the BIOS settings). At the installation boot prompt that you get, enter the following command:
boot: linux rescue
... and press Enter. The installer will ask you a few questions like the language you would like to use, the type of keyboard etc. Then, if you have linux previously installed on your machine, the Fedora installer will automatically detect it and mount it in the /mnt/sysimage directory. Once the linux partition is mounted, you are dropped into the command shell prompt. The next step is to make your newly mounted directory the root (or parent) directory. This you do by running the chroot command as follows:
# chroot /mnt/sysimage
# _
Now you are in the shell with respect to the parent directory which is the linux partition on your harddisk.

From here, the steps needed depends on which bootloader you are using. You have to have a fair idea what is the device node of your harddisk partition housing your MBR. In most cases, it is /dev/hda if you have an IDE harddisk. But if you have a SCSI harddisk, it will be /dev/sda.

Restoring GRUB
Execute the following command :
# grub-install /dev/hda
... to install GRUB boot loader on to your MBR. And then type exit to reboot the machine. Now your GRUB boot loader is fixed.

Restoring LILO
LILO stands for LInux LOader which was the boot loader used before GRUB was developed. It is fairly cryptic and is the default bootloader prior to and in RedHat 7.0 .
Here you just type the command :
# /sbin/lilo
... to install the bootloader on to the MBR.

If you don't have a Fedora CD, then you need not despair. You can also repair the boot loader using one of the numerous live CDs available.

Using Knoppix CD to repair the boot loader
Here you have to boot into knoppix (either GUI mode or text mode). Once you are logged in, fire up a terminal (in GUI mode) and type the following commands:
$ su -
# fdisk -l
This will list your hard disk partition information. From the listing, you can know in which partition you have linux installed. Now you have to mount the partition which contains the linux filesystem. For the sake of this discussion, let us assume it is /dev/hda3 .
# mount -t ext3 -o rw /dev/hda3 /mnt
#_
Now your linux partition is mounted at /mnt . Next you have to use the chroot command as follows:
# chroot /mnt
#_
The rest of the steps are the same as listed above for Restoring GRUB and LILO boot loaders.

Update (August 01 2007) : Many have said when they run the grub-install command after following the above steps, they get an error saying that /dev/hda is missing. The most probable reason is that when you chroot to the mount location, it does not have a copy of the device nodes on your machine. Here is a solution for that. If you have installed Linux with /boot/usr and / in different partitions then the above method may not get the desired results and running the grub-install /dev/hda command after running chroot might give the error that there is no /dev/hda. This is because you have mounted only one of the partitions which houses '/' . And the error tells you that it cannot find the device nodes. In this scenario you can do the following :

Lets say I have Linux installed with / in /dev/hda2, /boot in /dev/hda1 with an ext3 filesystem. I boot using a Live CD as described above and then mount the partitions as follows :
# mount  -t ext3  /dev/hda2  /mnt

# mount -t ext3 /dev/hda1 /mnt/boot
Remember that you are mounting the boot partition into the boot directory inside /mnt. Now mount the proc filesystem of your liveCD as follows (This is really an optional step):
# mount -t proc  none  /mnt/proc
Finally bind the device nodes build by your liveCD to the /mnt/dev location as follows :
# mount  -o bind /dev  /mnt/dev
Now you can chroot to the /mnt location and run the grub-install command as described above.
# chroot /mnt
# grub-install /dev/hda
Please note: This updated method is applicable only if you have a Linux installation spread across multiple partitions. If you have installed Linux in a single partition, the first and second step works flawlessly. At least it works for me.

Thursday, February 3, 2011

Reverse Proxy with ModProxy

I have added a new two months poll on this blog. It's about a normal questions about what actions will you do when the next Slackware release is available. I don't know when will that time be, but based on past experience, it should be coming soon enough, which makes me confident that it will be released before this poll ended in April.

So, see the Changelog if you are curious about what will be included in the next Slackware and if you can't wait for the final release, you can also upgrade to -Current or download the latest ISO which contains Slackware-Current updates (ask Google for it, as Slackware only provides you with the official release, not a snapshot or even RC release).

Monday, January 31, 2011

Display Past Date and Time

Following are various ways to display a past date and time: 
 
$ date --date='3 seconds ago' 
Thu Jan  1 08:27:00 PST 2009 
 
$ date --date="1 day ago" 
Wed Dec 31 08:27:13 PST 2008 
 
$ date --date="1 days ago" 
Wed Dec 31 08:27:18 PST 2008 
 
$ date --date="1 month ago" 
Mon Dec  1 08:27:23 PST 2008 
 
$ date --date="1 year ago" 
Tue Jan  1 08:27:28 PST 2008 
 
$ date --date="yesterday" 
Wed Dec 31 08:27:34 PST 2008 
 
$ date --date="10 months 2 day ago" 
Thu Feb 28 08:27:41 PST 2008 

Display Current Date and Time in a Specific Format

Following are different ways of displaying the current date and time in 

various formats: 

$ date 

Thu Jan  1 08:19:23 PST 2009 

 

$ date --date="now" 

Thu Jan  1 08:20:05 PST 2009 

 

$ date --date="today" 

Thu Jan  1 08:20:12 PST 2009 

 

$ date --date='1970-01-01 00:00:01 UTC +5 hours' +%s 

18001 

 

$ date '+Current Date: %m/%d/%y%nCurrent Time:%H:%M:%S' 

Current Date: 01/01/09 

Current Time:08:21:41 

 

$ date +"%d-%m-%Y" 

01-01-2009 

 

$ date +"%d/%m/%Y" 

01/01/2009 

 

$ date +"%A,%B %d %Y" 

Thursday,January 01 2009 

 

Following are the different format options you can pass to the date 

command: 

o    %D   date (mm/dd/yy) 

o    %d   day of month (01..31) 

o    %m   month (01..12) 

o    %y   last two digits of year (00..99) 

o    %a   locale’s abbreviated weekday name (Sun..Sat) 

o    %A   locale’s full weekday name, variable length 

(Sunday..Saturday) 

o    %b   locale’s abbreviated month name (Jan..Dec) 

o    %B   locale’s full month name, variable length 

(January..December) 

o    %H   hour (00..23) 

o    %I   hour (01..12) 

o    %Y   year (1970…) 

 

Friday, January 21, 2011

Set Hardware Date and Time

Before setting the hardware date and time, make sure the OS date and time 
is set appropriately as shown in the set-system-date-and-time
 
Set the hardware date and time based on the system date as shown below: 
 
# hwclock –systohc 
 
# hwclock --systohc –utc 
 
Use hwclock without any parameter, to view the current hardware date and 
time: 
 
# hwclock 
 
Check the clock file to verify whether the system is set for UTC: 
 
# cat /etc/sysconfig/clock 
 
ZONE="America/Los_Angeles" 
UTC=false 
ARC=false 

Set System Date and Time

To change the system date use:  
 
# date {mmddhhmiyyyy.ss} 
 
o    mm – Month 
o    dd – Date 
o    hh – 24 hour format 
o    mi – Minutes 
o    yyyy – Year 
o    ss – seconds 
 
For example, to set system date to Jan 31st 2008, 10:19 p.m, 53 seconds 
 
# date 013122192009.53 
 
You can also change system date using set argument as shown below. 
 
# date 013122192009.53 
 
# date +%Y%m%d -s "20090131" 
 
# date -s "01/31/2009 22:19:53"  
 
# date -s "31 JAN 2009 22:19:53" 
 
# date set="31 JAN 2009 22:19:53" 
 
To set the time only: 
 
# date +%T -s "22:19:53" 
 
# date +%T%p -s "10:19:53PM" 

Thursday, January 20, 2011

Use “shopt -s cdspell” to automatically correct mistyped directory names on cd

Use shopt -s cdspell to correct the typos in the cd command automatically as 
shown below. If you are not good at typing and make lot of mistakes, this will 
be very helpful. 
 
# cd /etc/mall 
-bash: cd: /etc/mall: No such file or directory 
 
# shopt -s cdspell 
 
# cd /etc/mall 
 
# pwd 
/etc/mail 
 
[Note: By mistake, when I typed mall instead of mail, 
          cd corrected it automatically] 

Use dirs, pushd and popd to manipulate directory stack

You can use directory stack to push directories into it and later pop directory 

from the stack. Following three commands are used in this example. 

o    dirs: Display the directory stack 

o    pushd: Push directory into the stack 

o    popd: Pop directory from the stack and cd to it 

Dirs will always print the current directory followed by the content of the 

stack. Even when the directory stack is empty, dirs command will still print 

only the current directory as shown below. 

# popd 

-bash: popd: directory stack empty 

 

# dirs 

 

# pwd 

/home/ramesh 


How to use pushd and popd? Let us first create some temporary directories 

and push them to the directory stack as shown below. 

 

 

# mkdir /tmp/dir1 

# mkdir /tmp/dir2 

# mkdir /tmp/dir3 

# mkdir /tmp/dir4 

 

# cd /tmp/dir1 

# pushd . 

 

# cd /tmp/dir2 

# pushd . 

 

# cd /tmp/dir3 

# pushd . 

 

# cd /tmp/dir4 

# pushd . 

# dirs 

/tmp/dir4 /tmp/dir4 /tmp/dir3 /tmp/dir2 /tmp/dir1 

 

[Note: The first directory (/tmp/dir4) of the dir 

command output is always the current directory and not 

the content from the stack.] 

 

# dirs 

/tmp/dir4 /tmp/dir4 /tmp/dir3 /tmp/dir2 /tmp/dir1 

 

[Note: The first directory (/tmp/dir4) of the dir 

command output is always the current directory and not 

the content from the stack.] 

 

At this stage, the directory stack contains the following directories: 

 

/tmp/dir4 

/tmp/dir3 

/tmp/dir2 

/tmp/dir1 

 

The last directory that was pushed to the stack will be at the top. When you 

perform popd, it will cd to the top directory entry in the stack and remove it 

from the stack. As shown above, the last directory that was pushed into the 

stack is /tmp/dir4. So, when we do a popd, it will cd to the /tmp/dir4 and 

remove it from the directory stack as shown below. 

 

# popd 

# pwd 

/tmp/dir4 

 

[Note: After the above popd, directory Stack Contains: 

/tmp/dir3 

/tmp/dir2 

/tmp/dir1] 

 

# popd 

# pwd 

/tmp/dir3 

 

[Note: After the above popd, directory Stack Contains: 

/tmp/dir2 

/tmp/dir1] 

 

# popd 

# pwd 

/tmp/dir2 

 

[Note: After the above popd, directory Stack Contains: 

/tmp/dir1] 

 

# popd 

# pwd 

/tmp/dir1 

 

[Note: After the above popd, directory Stack is empty!] 

 

# popd 

-bash: popd: directory stack empty 


Wednesday, January 19, 2011

Perform mkdir and cd using a single command

Sometimes when you create a new directory, you may cd to the new directory 
immediately to perform some work as shown below. 
# mkdir -p /tmp/subdir1/subdir2/subdir3 
 
# cd /tmp/subdir1/subdir2/subdir3 
 
# pwd 
/tmp/subdir1/subdir2/subdir3 
Wouldn’t it be nice to combine both mkdir and cd in a single command? Add 
the following to the .bash_profile and re-login. 
$ vi .bash_profile 
 
function mkdircd () { mkdir -p "$@" && eval cd "\"\$$#\""; } 
Now, perform both mkdir and cd at the same time using a single command as 
shown below: 
# mkdircd /tmp/subdir1/subdir2/subdir3 
 
[Note: This creates the directory and cd to it automatically] 
 
# pwd 
/tmp/subdir1/subdir2/subdir3 
OK CU next time 

Use cd alias to navigate up the directory effectively

When you are navigating up a very long directory structure, you may be using 
cd ..\..\ with multiple ..\’s depending on how many directories you want to go 
up as shown below. 
# mkdir -p 
/tmp/very/long/directory/structure/that/is/too/deep 
 
# cd /tmp/very/long/directory/structure/that/is/too/deep 
 
# pwd 
/tmp/very/long/directory/structure/that/is/too/deep 
 
# cd ../../../../ 
 
# pwd 
/tmp/very/long/directory/structure 
Instead of executing cd ../../../.. to navigate four levels up, use one of the 
following three alias methods: 
 
Method 1: Navigate up the directory using “..n” 
In the example below, ..4 is used to go up 4 directory level, ..3 to go up 3 
directory level, ..2 to go up 2 directory level. Add the following alias to your 
~/.bash_profile and re-login. 
alias ..="cd .." 
alias ..2="cd ../.." 
alias ..3="cd ../../.." 
alias ..4="cd ../../../.." 
alias ..5="cd ../../../../.." 
 
# cd 
/tmp/very/long/directory/structure/that/is/too/deep 
 
# ..4 
[Note: use ..4 to go up 4 directory level] 
 
# pwd 
/tmp/very/long/directory/structure/
Method 2: Navigate up the directory using only dots 
In the example below, ….. (five dots) is used to go up 4 directory level.  
Typing 5 dots to go up 4 directory structure is really easy to remember, as 
when you type the first two dots, you are thinking “going up one directory”, 
after that every additional dot, is to go one level up. So, use …. (four dots) to 
go up 3 directory level and .. (two dots) to go up 1 directory level. Add the 
following alias to your ~/.bash_profile and re-login for the ….. (five dots) to 
work properly. 
alias ..="cd .." 
alias ...="cd ../.." 
alias ....="cd ../../.." 
alias .....="cd ../../../.." 
alias ......="cd ../../../../.." 
 
# cd /tmp/very/long/directory/structure/that/is/too/deep 
 
# ..... 
[Note: use ..... (five dots) to go up 4 directory level] 
 
# pwd 
/tmp/very/long/directory/structure/ 
Method 3: Navigate up the directory using cd followed by consecutive dots 
In the example below, cd….. (cd followed by five dots) is used to go up 4 
directory level. Making it 5 dots to go up 4 directory structure is really easy to 
remember, as when you type the first two dots, you are thinking “going up 
one directory”, after that every additional dot, is to go one level up. So, use 
cd…. (cd followed by four dots) to go up 3 directory level and cd… (cd 
followed by three dots) to go up 2 directory level. Add the following alias to 
your ~/.bash_profile and re-login for the above cd….. (five dots) to work 
properly. 
alias cd..="cd .." 
alias cd...="cd ../.." 
alias cd....="cd ../../.." 
alias cd.....="cd ../../../.." 
alias cd......="cd ../../../../.." 
 
# cd /tmp/very/long/directory/structure/that/is/too/deep 
 
# cd..... 
[Note: use cd..... to go up 4 directory level] 
 
# pwd 
/tmp/very/long/directory/structure 
Method 5: Navigate up the directory using cd followed by number 
In the example below, cd4 (cd followed by number 4) is used to go up 4 
directory level.  
 
alias cd1="cd .." 
alias cd2="cd ../.." 
alias cd3="cd ../../.." 
alias cd4="cd ../../../.." 
alias cd5="cd ../../../../.." 
CU next tutorial 

Use CDPATH to define the base directory for cd command

If you are frequently performing cd to subdirectories of a specific parent 
directory, you can set the CDPATH to the parent directory and perform cd to 
the subdirectories without giving the parent directory path as explained 
below. 
 
[ramesh@dev-db ~]# pwd 
/home/ramesh 
 
[ramesh@dev-db ~]# cd mail 
-bash: cd: mail: No such file or directory 
 
[Note: This is looking for mail directory under current 
directory] 
 
[ramesh@dev-db ~]# export CDPATH=/etc 
[ramesh@dev-db ~]# cd mail 
/etc/mail 
 
[Note: This is looking for mail under /etc and not 
under current directory] 
 
[ramesh@dev-db /etc/mail]# pwd 
/etc/mail 
 
To make this change permanent, add export CDPATH=/etc to your 
~/.bash_profile 
Similar to the PATH variable, you can add more than one directory entry in 
the CDPATH variable, separating them with : , as shown below. 
 
export CDPATH=.:~:/etc:/var 
 
This hack can be very helpful under the following situations: 
o    Oracle DBAs frequently working under $ORACLE_HOME, can set 
the CDPATH variable to the oracle home 
o    Unix sysadmins frequently working under /etc, can set the 
CDPATH variable to /etc 
o    Developers frequently working under project directory 
/home/projects, can set the CDPATH variable to /home/projects 
o    End-users frequently accessing the subdirectories under their 
home directory, can set the CDPATH variable to ~ (home 
directory)  

Monday, January 17, 2011

Linux Kernel 2.6.37 Released

Another year has passed and thus another new kernel release by Linus. As expected, Linus finally released the final Linux Kernel 2.6.37 as of today after having several RC release before Christmas and eventually it didn't make it as Christmas gift for everyone, so let's just consider this as a new year gift. Fair enough.

At this moment, the link on Kernel.org hasn't showed up, but you can still download it by clicking on this link. More information about what has been included in this release in human-friendly language can be seen inKernelNewbies (give some tim to update the page as the kernel has just been released).

Now, time to look for patches for NVidia and VMWare if i wanted to compile this kernel Yahoo

Thursday, January 13, 2011

open port in microtik

Mikrotik on setting the default to open five ports to access the server, to see the open ports can use the command: 

/ip service pr
It will look something like this 

 

01[admin@MikroTik] > /ip service pr
02Flags: X - disabled, I - invalid
03 #   NAME               PORT  ADDRESS
04 0   telnet             23    0.0.0.0/0
05 1   ftp                21    0.0.0.0/0
06 2   www                80    0.0.0.0/0
07 3   ssh                22    0.0.0.0/0
08 4 X www-ssl            443   0.0.0.0/0
09 5 X api                8728  0.0.0.0/0
10 6   winbox             8291  0.0.0.0/0


suppose we want to close the ports for telnet, the command used is: 

 

 

1/ip service set telnet disabled=yes


ketik :

 

1/ip service pr


and shall appear the sign x in the telnet, as in www-ssl and API. 
want to open the port if disabled = no 

 

1/ip service set telnet disabled=yes

   Cwim