Unix/Linux 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 Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Linux
Sponsored Links
    #2  
Old Unix and Linux 05-07-2013
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 30 June 2015, 12:10 PM EDT
Location: Galactic Empire
Posts: 3,407
Thanks: 240
Thanked 1,216 Times in 1,142 Posts
I guess globbing is disabled. Can you enable globbing and retry?

Code:
set +o noglob

Sponsored Links
    #3  
Old Unix and Linux 05-07-2013
MadeInGermany MadeInGermany is online now Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 30 June 2015, 12:31 PM EDT
Location: Simplicity
Posts: 2,489
Thanks: 184
Thanked 754 Times in 682 Posts
or

Code:
set +f

    #4  
Old Unix and Linux 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 Unix and Linux 05-07-2013
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 30 June 2015, 12:10 PM EDT
Location: Galactic Empire
Posts: 3,407
Thanks: 240
Thanked 1,216 Times in 1,142 Posts
What is your OS and SHELL?

Code:
uname


Code:
echo $SHELL

Sponsored Links
    #6  
Old Unix and Linux 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 Unix and Linux 05-08-2013
MadeInGermany MadeInGermany is online now Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 30 June 2015, 12:31 PM EDT
Location: Simplicity
Posts: 2,489
Thanks: 184
Thanked 754 Times in 682 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 12:49 PM.