[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Others  |  Miscellaneous  |  Topic: Difference In Command
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: Difference In Command  (Read 591 times)
0 Members and 1 Guest are viewing this topic.
rajesh.bahl
Linux Learner
***
Offline Offline

Posts: 74


View Profile
« on: November 13, 2007, 01:35:58 PM »


Hi Guys!

Need your views on this :-

If I run the command:

find / -name  foo* -print

on my system, I get a big listing of 121 files.

Again if I run :

find / -name foo\* -print

I get the same listing of 121 files.


What exactly is the difference between these two commands ? Under what scnerio each one is used ?
If possible quote some examples in your explanations !

regards
rajesh.bahl
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #1 on: November 14, 2007, 04:22:25 PM »

Both commands are same ie. will give same output, both will list files whose name starts with "foo"

The difference is that in foo\* is acting as escape character as we do in programming, some shell need this to specifically specify and some do not hence both are working.
Logged
dragoncity99
LST CareTaker
Experienced
*****
Offline Offline

Posts: 494


View Profile
« Reply #2 on: December 14, 2007, 09:59:35 PM »

FYI

[root@rhel4 /]# find /root -name foo*
/root/foo2
/root/foo1
/root/foo*
[root@rhel4 /]#
[root@rhel4 /]#
[root@rhel4 /]# find /root -name foo\*
/root/foo2
/root/foo1
/root/foo*
[root@rhel4 /]#
[root@rhel4 /]#
[root@rhel4 /]# find /root -name "foo\*"
/root/foo*
[root@rhel4 /]#
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2215


View Profile
« Reply #3 on: December 18, 2007, 01:53:10 AM »

That is clear Smiley
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Difference Between RHL and RHEL Os Talk mysaeed 5 2129 Last post August 23, 2008, 04:18:27 AM
by Sahil
Difference between Redhat and Mandrake Linux Os Talk xhunter 9 2944 Last post April 08, 2005, 10:04:32 AM
by yzq
NAT and Squid Difference Linux Proxy Server Support shani 4 964 Last post December 15, 2004, 08:16:56 AM
by Ricky
difference b/w GTK+ of PCQLinux and Redhat Linux Linux Development & Programming sallu 0 735 Last post January 25, 2006, 12:27:58 AM
by sallu
Difference between pcqlinux and RHEL Linux Kernel sreeni19 1 542 Last post March 15, 2007, 01:43:11 PM
by Ricky
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 01, 2008, 07:30:51 PM

Login with username, password and session length
Navigation
Recent Discussions
[November 29, 2008, 02:23:49 PM]

[November 29, 2008, 02:14:14 PM]

[November 29, 2008, 04:00:36 AM]

[November 28, 2008, 07:05:28 AM]

[November 28, 2008, 07:04:39 AM]

[November 28, 2008, 06:58:16 AM]

[November 28, 2008, 06:47:09 AM]

[November 26, 2008, 11:53:32 AM]

[November 26, 2008, 04:00:22 AM]

[November 25, 2008, 06:44:47 PM]
Members
Total Members: 6252
Latest: rash31
Stats
Total Posts: 8285
Total Topics: 2257
Online Today: 34
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 6
Total: 6
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc