sureshmsi.co.nr

  • co.nr

Posts Tagged ‘Linux’

How to list only directories in linux console

Posted by sureshm on December 2, 2007

Well, we know how to list files and directories in console. Yes ‘ls’ is enough.

The ‘ls’ will display all files and directories. To list only directories use :

[ myEmpire$]: ls -d */

🙂 This will do the trick. 😉

To list only directories, use any one of the following commands.

# ls -d */
# ls -l | grep ‘^d’
# ls -p |grep “/”

# find . -type d (Show full hierarchy)
# find . -type d -maxdepth 1 -mindepth 1

# echo */
# echo */ */ (dig deeper)

# tree -d (Show full hierarchy)
# tree -d -L 1
# tree -fid

Advertisements

Posted in Linux, Technical | Tagged: , , | Leave a Comment »

How to install the GNU C++ compiler on Linux

Posted by sureshm on October 27, 2007

Now a days there are lot of easy tools/commands for the installation in Linux. The most commonly used are yum, apt-get, urpmi etc.

The below will help you to install GNU C++ complier using the source file. Please make sure that you have root (wheel user) privilege in the machine in order to have write access to the referenced directories.

01. Create a directory named gcc under /usr
mkdir /usr/gcc

02. Download the following files by running the command as follows.
wget http://cudlug.cudenver.edu/GNU/gnu/gcc/gcc-3.4.3/gcc-3.4.3.tar.bz2
wget http://cudlug.cudenver.edu/GNU/gnu/gcc/gcc-3.4.3/gcc-core-3.4.3.tar.bz2

03. Uncompress the two files.
tar xjvf gcc-g++-3.4.3.tar.bz2 ; tar xjvf gcc-core-3.4.3.tar.bz2

04. Then do the following commands.
rm -rf /usr/gcc/obj/* ; mkdir /usr/gcc/obj ; cd /usr/gcc/obj

05. Run the configure with the options C and C++
../gcc-3.4.3/configure -enable-languages=c,c++

06. Make it
make bootstrap ; make install

That’s all.
Verify it with the following commands.
To know the path :
which g++

To know the version:
g++ -v

Posted in BSD, Linux, Technical | Tagged: , , , , , , , , , | Leave a Comment »

Disable SSLv2 and enable SSLv3 in the server in Ensim Linux Server

Posted by sureshm on October 26, 2007

Disable SSLv2 and enable SSLv3 in the server in Ensim Linux Server

Edit the conf of ssl

# vi /etc/httpd/conf.d/ssl.conf

Add/Edit the lines

SSLProtocol -All +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:!SSLv2:+EXP
Restart Apache

/etc/init.d/httpd restart

You can connect the server using OpenSSL to test it :

openssl s_client -connect localhost:443

Replace the localhost with the server name

Posted in Control Panels, Ensim, Linux, Technical | Tagged: , , , , , , | Leave a Comment »