Ls command question | Unix Linux Forums | UNIX and Linux Applications

  Go Back    


UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

Ls command question

UNIX and Linux Applications


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-07-2013
jmartin99 jmartin99 is offline
Registered User
 
Join Date: May 2013
Last Activity: 5 September 2013, 10:17 AM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Ls command question

I am scratching my head right now. I am trying to archive a ton of files in a directory. I am attempting to tar them by year. On our development server if I type ls *_2008* it returns all of the files I am expecting to see. (The format of the filename includes xx_xx_xxx_2008-09-29_xxx.xxxx.xxxx) When I run the same command on the production server it says file or directory not found. Yet when I do a simple ls I see tons of files that I would expect to come back with the pervious ls command.

Any ideas why it works fine on our development system and does not work on production?

Thanks!

Jeff
Sponsored Links
    #2  
Old 05-07-2013
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 17 April 2014, 8:35 PM EDT
Location: Galactic Empire
Posts: 3,282
Thanks: 227
Thanked 1,157 Times in 1,094 Posts
I guess globbing is disabled. Can you enable globbing and retry?

Code:
set +o noglob

Sponsored Links
    #3  
Old 05-07-2013
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 16 April 2014, 4:46 PM EDT
Posts: 1,596
Thanks: 90
Thanked 452 Times in 409 Posts
or

Code:
set +f

    #4  
Old 05-07-2013
jmartin99 jmartin99 is offline
Registered User
 
Join Date: May 2013
Last Activity: 5 September 2013, 10:17 AM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Nope, that did not change the results of the ls *_2008* command on production.

Thanks for the suggestion anyway!

Jeff
Sponsored Links
    #5  
Old 05-07-2013
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 17 April 2014, 8:35 PM EDT
Location: Galactic Empire
Posts: 3,282
Thanks: 227
Thanked 1,157 Times in 1,094 Posts
What is your OS and SHELL?

Code:
uname


Code:
echo $SHELL

Sponsored Links
    #6  
Old 05-08-2013
jmartin99 jmartin99 is offline
Registered User
 
Join Date: May 2013
Last Activity: 5 September 2013, 10:17 AM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

Code:
$ uname
SunOS
$ echo $SHELL
/bin/ksh
$


Last edited by vbe; 05-08-2013 at 11:12 AM.. Reason: code tags next time please...
Sponsored Links
    #7  
Old 05-08-2013
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 16 April 2014, 4:46 PM EDT
Posts: 1,596
Thanks: 90
Thanked 452 Times in 409 Posts
It works for me, please verify:

Code:
$ uname
SunOS
$ set +f
$ touch /tmp/bla_2008bla_bla
$ echo /tmp/*_2008*
/tmp/bla_2008bla_bla

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
New to Unix command line and have a question about the "sort" command budfoxcat UNIX for Dummies Questions & Answers 1 11-28-2011 12:46 AM
question about cd command snow123451 Shell Programming and Scripting 6 08-25-2011 02:43 AM
mv Command question MaStErXLY UNIX for Dummies Questions & Answers 4 08-29-2009 05:07 PM
while command question zmfcat1 Shell Programming and Scripting 4 05-19-2009 12:13 PM
A command question chiru_h Shell Programming and Scripting 1 07-11-2007 04:56 PM



All times are GMT -4. The time now is 01:34 PM.