LinuxQuestions.org
Help answer threads with 0 replies.
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-30-2010, 12:45 AM   #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-30-2010, 12:50 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
RTFM: man ldd, man strings, man which.
 
Old 09-30-2010, 12:52 AM   #3
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,145
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
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, 01: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, 01:37 AM   #5
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

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 01:39 AM.
 
1 members found this post helpful.
Old 09-30-2010, 01:47 AM   #6
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,145
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
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, 01:52 AM   #7
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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, 01:56 AM   #8
veeruhs
LQ Newbie
 
Registered: Feb 2010
Posts: 17

Original Poster
Rep: Reputation: 0
commands

Hi,

Thanks for the reply
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:21 PM
what is the similarity between linux commands and dos commands kamalkirat1 Linux - Software 6 11-21-2008 09:54 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - Software 2 07-02-2008 07:26 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 07:53 AM
Suse Linux Commands For These Aix Commands? Vaskar Guha Linux - Software 2 12-19-2005 01:45 AM

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

All times are GMT -5. The time now is 09:10 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration