LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-29-2010, 11:45 PM   #1
veeruhs
LQ Newbie
 
Registered: Feb 2010
Posts: 17

Rep: Reputation: 0
commands


Hi,

Can anybody tell me what does the below commands do?

1.ldd $(which vsftpd) | grep libwrap

2.strings $(which vsftpd) | grep hosts


Thanks in advance
Veerendra
 
Old 09-29-2010, 11:50 PM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
RTFM: man ldd, man strings, man which.
 
Old 09-29-2010, 11:52 PM   #3
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
ldd - print's shared library dependencies
which vsftpd -- gives its binary parh---/usr/sbin/vsftpd
grep libwrap-- searches for libwrap (from other lists)

same way:

strings - print the strings of printable characters in files.
 
1 members found this post helpful.
Old 09-30-2010, 12:30 AM   #4
veeruhs
LQ Newbie
 
Registered: Feb 2010
Posts: 17

Original Poster
Rep: Reputation: 0
commands

Hi Prayag,

Thanks for your reply...can u pls tell me what does $ symbol do?

Thnaks
Veerendra
 
Old 09-30-2010, 12:37 AM   #5
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Rep: Reputation: 55
Hi,

Any thing enclosed in $( ) will be treated as command to execute.

$( ) is same as enclosing in back quotes ` `

Lets take this example

Here hostname inside echo is just treated as text to be displayed.

Code:
[user@CDC ~]$ echo "Host name is hostname"
Host name is hostname
In the below command hostname in echo command is a command. In order to execute it under echo, we need to enclose it under $( ) or ` `
Code:
[user@CDC ~]$ echo "Host name is $(hostname)"
Host name is CDC

# this is also same

[user@CDC ~]$ echo "Host name is `hostname`"
Host name is CDC

Last edited by vinaytp; 09-30-2010 at 12:39 AM.
 
1 members found this post helpful.
Old 09-30-2010, 12:47 AM   #6
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
Hi,

Above post explained everything.i.e usage of $

Would suggest you to refer this short guide to quickly learn basics of shell scripting:

http://147.188.192.43/documentation/...xscripting.pdf
 
1 members found this post helpful.
Old 09-30-2010, 12:52 AM   #7
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
veeruhs

Check this out:
http://tldp.org/LDP/abs/html/internalvariables.html
and
http://tldp.org/LDP/abs/html/index.html
 
Old 09-30-2010, 12:56 AM   #8
veeruhs
LQ Newbie
 
Registered: Feb 2010
Posts: 17

Original Poster
Rep: Reputation: 0
commands

Hi,

Thanks for the reply
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux equivalent commands for all Solaris commands Harry_Linux008 Linux - Newbie 4 08-22-2010 07:21 PM
what is the similarity between linux commands and dos commands kamalkirat1 Linux - Software 6 11-21-2008 08:54 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - Software 2 07-02-2008 06:26 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 06:53 AM
Suse Linux Commands For These Aix Commands? Vaskar Guha Linux - Software 2 12-19-2005 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration