Apr 17, 2013

error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format

Problem:
error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format

Solution:
if you are compiling in cygwin or unix\linux you can apply dos2uinx on files to remove this issue.


mohan@MOHANTL1C ~
$ dos2unix.exe test.txt
dos2unix: converting file test.txt to Unix format ...

Mar 1, 2013

How to change password in perforce

You can change your password in perforce using p4 cmd 'passwd'. This is same in windows\Linux. Example given below.


C:\Users\mohan>p4 passwd
Enter old password:
Enter new password:
Re-enter new password:
Password updated.

Feb 26, 2013

How to find a system 32 or 64 bit

In any Linux variants either one of this should work ( Redhat, Cent-Os, Ubuntu, Hp-ux, Solaris etc )

[mohan@chinna ~]$ arch
x86_64
[mohan@chinna ~]$ uname -m
x86_64
[mohan@chinna ~]$ getconf LONG_BIT
64


As you can guess, 64 / x86_64 is 64bit system, whereas 32 / i386 / i686  denotes its a 32 bit sytem.


For windows
Right-click MyComputer->Properties

It will bring a window like below image, from that you can check the system type

Feb 25, 2013

How to edit iptables in linux

Problem:
sometimes you may receive below error like

The description for Event ID ( 0 ) in Source ( sshd ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: sshd: PID 2992: Accepted publickey for build from 10.69.250.31 port 33344 ssh2.

Solution :
Either Turn off the firewall in linux or add the port 22 as exception in iptables

To disable selinux  edit /etc/sysconfig/selinux    and set SELINUX to disabled.

SELINUX=disabled

I've encountered such problems when the binaries and libraries were not
executable by SYSTEM.
"chmod 755 /usr/sbin/* /usr/bin/*" fixed the problem.

If the problem still exists, add the port to the iptables.

For adding port 22 to the iptables, from shell run

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

or

edit /etc/sysconfig/iptables
and append this line

-A INPUT -p tcp --dport 22 -j ACCEPT
Save and close the file. Restart iptables:
/etc/init.d/iptables restart
or
service iptables restart
Learn more about iptables by
man iptables

Feb 24, 2013

How to add Gnome to a CentOS 6 minimal install

Problem:
sometimes you may receive below error like

The description for Event ID ( 0 ) in Source ( sshd ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: sshd: PID 2992: Accepted publickey for build from 10.69.250.31 port 33344 ssh2.

Solution :
Either Turn off the firewall in linux or add the port 22 as exception in iptables

To disable selinux  edit /etc/sysconfig/selinux    and set SELINUX to disabled.

SELINUX=disabled

I've encountered such problems when the binaries and libraries were not
executable by SYSTEM.
"chmod 755 /usr/sbin/* /usr/bin/*" fixed the problem.

If the problem still exists, add the port to the iptables.

For adding port 22 to the iptables, from shell run

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

or

edit /etc/sysconfig/iptables
and append this line

-A INPUT -p tcp --dport 22 -j ACCEPT

Feb 23, 2013

How to Sync Google Calendar, Outlook and iPhone Calendar

Please refer the below url
http://email.about.com/od/googlecalendartips/qt/Sync_Outlook_Google_Calendar_and_iPhone_Calendar.htm

Feb 22, 2013

How to create checksums for all files recursively

To create checksums for all files recursively

find . -type f -exec md5sum "{}" +;