Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
November 22, 2024, 08:51:50 PM
News
: LinuxSolved.com Linux Help Community Forum..
Home
Search
Login
Register
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
»
Others
»
Miscellaneous
»
Difference In Command
« previous
next »
Print
Pages: [
1
]
Author
Topic: Difference In Command (Read 6671 times)
rajesh.bahl
Linux Learner
Posts: 86
Difference In Command
«
on:
November 13, 2007, 06: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
Posts: 2381
Re: Difference In Command
«
Reply #1 on:
November 14, 2007, 09: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
Posts: 551
Re: Difference In Command
«
Reply #2 on:
December 15, 2007, 02:59:35 AM »
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
Posts: 2381
Re: Difference In Command
«
Reply #3 on:
December 18, 2007, 06:53:10 AM »
That is clear
Logged
Print
Pages: [
1
]
« previous
next »
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
»
Others
»
Miscellaneous
»
Difference In Command