Grep command to search files which have names of same pattern

Hi,
I am new to solaris.
I am trying to grep all the files in a directory which have names of same pattern.
I had done this in linux but in solaris it is not working.
e.g. i have two files setup.log and setup.log.full
grep -l 'setup*' *
by this command it works fine on linus but on solaris it is not working.
Please let me know where am i wrong.
regards,

How many files do you have in this directory? It could be that the expansion of the file list is too large for the shell to handle? Or that first asterisk is expanding to something unusable. I'm surprised this works in Linux. What shell are you using in Linux and what shell are you using in Solaris? What error message do you get when you try to run this in a Solaris system?
Maybe try to use something like this:
ls -1 | awk '{ print "grep -l "$1" "$1 }' | sh

Similar Messages

  • I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it show

    I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it shows in LR under folders as the F drive and the little green light is on, but LR is showing only the first 6 files and not the remaining 200 or so. How do I expand the F folder to expose all files?

    I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it shows in LR under folders as the F drive and the little green light is on, but LR is showing only the first 6 files and not the remaining 200 or so. How do I expand the F folder to expose all files?

  • Unix Command to search file

    Hi
    Can anyone tell me how to get filename from server using
    UNIX command in ABAP program.I have requirement to search file in server using date criteria.
    should i use 'FIND' command to search file??
    Plz do needful..

    You need to use SM69 to define command and use it in your report.
    Regards,
    Christophe

  • How can i make cotrol file which have conveyor and ?

    how can i make cotrol file which have conveyor " to move the bottle and slider " to fill the same bottle ?
    i attach my control file.............
    " Science is came....not come "
    I study Mechatronics Engineer
    skype : t_alhowaiti
    Attachments:
    convyer.ctl ‏16 KB

    Jeff·Þ·Bohrer wrote:
    billko wrote:
    ThaerAL-Hwaiti wrote:
    i want to make a production line which move a bottle on a conveyor and fill it .
    That's all good and fine, but what have you tried codewise?  Let's see what you have so far and we can go from there.
    The easy answer is "an assignment" and a desire to pass the course without actually needing to read and comprehend information.
    I as trying to be diplomatic about it. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Search files which filename contains a speicific string

    Hi
    I'm lookng for a way to find all files in a directory which part of filename contains a specific string.
    e.g.:
    string = hello
    files;
    - 1hello2.txt
    - 22he45.txt
    - gehello42353.txt, ....
    The result should be either an index or the complete filename that matches. In the example I'd found index 0 and 2, or 1hello2.txt and gehello42353.txt.
    Actually I have the list of the files with the "recursive list.vi".
    Any suggestions are welcome.
    Thanks for your precious help
    Yves
    Solved!
    Go to Solution.

    You can use List Folder - function with *hello* -pattern.
    From there you get filenames, which include that specific pattern.
    If you allready have list of files:
    - use Scan string for tokens in a for loop and if token index != -1, then you can add that array index to the list.
    I´m sure there are better ways to do this, but nothing I can come up with quickly.
    Attachments:
    search.png ‏16 KB

  • HT2518 i would like to copy files from an external hard drive to my Mac. I intend to do this several times. Does Mac identify this files which have already be copied over or does it re- copy them every time?

    i would like to copy files from an external hard drive to my Mac. I intend to do this several times. Will Mac copy the same files every time or can it segregate and only copy new files from the external hard drive?

    Only copies the file or files you select. The selection will remain unless you change it in case you wish to repeat the same copy to another location. Multiple and different copy operations can be run simultaneously.

  • New iMac to which I have imported outlook mail files which have set up as individual mailboxes. There are now so many mailboxes that mail will not open so I can't do anything with them. What can I do.

    I have a brand new iMac and I have incorectly imported 20k plus outlook mail messages. They have all set up as individual mailboxes so mail locks when I try to open it. So I am stuck because I can't get into mail to do anything with these messages. Please help if you can. Regards Tebbs

    Now new mail is coming to both computer's inboxes but there is no number on the stamp icon on dock to show number of emails on the iMac. Nor is there a number by either email address under MAILBOXES/inbox (sidebar) on the iMac. This number is showing on MacBook Pro.
    I also can save drafts now on both computers.
    Seems the Pro is fixed and the iMac is only missing the numbers on dock icon and by addresses in inbox.
    Now that the problem is less, I feel i am wasting your time but will continue so maybe I can get those numbers back.
    Two emails > AT&T email and gmail.
    Apple's Mail program for email - yes, and gmail.
    IMAP for both accounts.
    Did not change mail configuration on MacBook.
    The iMac and MacBook Pro have the same mail configuration except in Accounts/mailbox behaviours/store draft messages on the server was not marked on MacBook > it is now.
    'Store junk messages on the server' was marked on one computer for gmail, but is unmarked on both now.
    On the iMac, Accounts/Accounts info/Outgoing mail for gmail is smtpgmail.
    On the MacBook Pro for gmail it is smpt.gmail.com (plus) my email address.
    Rules/Add rule window, on the MacBook third line is 'Any Recipient', on the iMac third line is 'From."
    The last box on that line has my email address on the MacBook.
    The last box on that line has the last address I sent an emil to (last night), on the iMac.
    On the last line on iMac, no box was selicted for 'to mailbox' > I choose 'inbox' because it is on the MacBook Pro.
    Now I have a Rule #1 and am not sure I should have because there was no rules marked when I took the computer in.
    Thank you. I relized I had done the labeling wrong when so much of my question appeared twice and no one else's did. I know how to do it now.
    Thank you so much,
    Arudi

  • How do I find which photo iPhoto is telling me I have a problem with? I'm trying to buy a book I've formatted, but in place of the filename, it just calls it "(null)". All of the photos I'm using have names.

    How do I find which photo iPhoto is telling me I have a problem with?
    I'm trying to buy a book I've formatted, but in place of the filename, it just calls it "(null)".
    All of the photos I'm using have names.

    That same one others seem to have gotten: "Unable to Assemble Book -- There is a problem with the photo with the filename “(null).” The full resolution version of this photo either cannot be located or is corrupt. Please replace this photo or delete it from your book"
    I've tried restarting iPhoto with the option and command keys pressed, and asking it to repair permissions, but still have the same message...

  • OS command to get file name

    Hello All,
    Using a single receiver communication channel I have to generate 2 output files.
    One output file name is OUTPUT.txt and the second output file name is OUTPUT<YYYYMMDD>.txt
    I am generating first output file name using standard file name scheme.
    And for generating second output file name I am using Run OS command option.
    can some one tell me the OS command to get the file name OUTPUT<YYYYMMDD>.txt?
    Thanx,
    Regards,
    Moorthy

    We would really like like to know how you are going to create 2 file (with different names) using same CC.
    If you are going to use "Add timestamp" then both the files will have timestamp at the end (unlike your requirement for the first file).
    I think its better to create 2 CC ..first with output.txt and the other OUTPUT<YYYYMMDD>.txt
    Also, please tell us more about ur requirment..if the content is same then..u can simply use a CC and use OS command (after processing option ) to copy it to the other location with required file name (OUTPUT<YYYYMMDD>.txt)
    Something like this  if u r using unix system and both the files are at same location:
    cp OUTPUT.txt OUTPUT2.txt

  • Plz clarify with grep command

    Regarding grep command,i have given in linux
    grep -r "some name" & (& i have given instead of *).after enter some below mesg throws like
    [+1] + stopped [sigttin] .
    when i typed exit it shows YouHave stopped jobs.
    Is this any problem with this command for running background jobs?
    can anyone please suggest ASAP.Thanks in Advance.

    grep -r "some name"Are you searching for file content or filename? In the later case, you would use find, not grep.
    The grep command requires a file paramter. & as file parameter is not valid.
    You could possibly use "grep -r "something" ./* &. But what would be the purpose of running such a command in the background unless you pipe the output to a file, e.g.
    <pre>
    grep -r "something" * > output.lst &
    </pre>

  • Prevent using special characters in file and folder names?

    I've recently begun adding windows clients to my network. In doing so, I've found that on my file shares from OS X server, the windows clients are unable to see files and folders which have names containing special characters such as / ? < > \ : * | ”
    Unfortunately my accounting department has been creating files with these characters in their names for several years. I would like to find if there is a way to prevent them from using a defined set of characters in the file and folder names to prevent them from "accidentally" doing so in the future.
    I've found that by turning off streams support on SMB in OS X server, that my windows clients can at least see that a file or folder should exist, albeit with a corrupted file name. Removing the special characters from these names allows the proper name to become visible and the file accessible.
    Any info would be greatly appreciated.

    (_seb_) wrote:
    > Gary White wrote:
    >> On Sun, 19 Nov 2006 19:15:04 +0100, "(_seb_)"
    <[email protected]> wrote:
    >>
    >>> "ça alors: it's a déjà-vu"
    >>>
    >>> How can I encode this so it's valid as a
    directory name, yet can be
    >>> displayed as intended when the name is output to
    the page.
    >>> urlencode() does not do the job, neither does
    htmlentities()...
    >>
    >>
    >> What's wrong with:
    >>
    >> $l="ça alors: it's a déjà-vu";
    >> print urlencode($l)."<br>\n";
    >> print htmlspecialchars($l);
    >>
    >> Gary
    >
    >
    > I know that, but what is the name of the directory? It
    has to be a real
    > directory name, not a string stored somewhere.
    >
    > What's a valid encoding for a directory named "ça
    alors: it's a
    > déjà-vu"? I can call a folder like this on my
    Mac, but it won't work on
    > any server...
    >
    >
    >
    PS: basically it's not a url encoding issue.
    I can url encode "ça alors: it's a déjà-vu",
    and pass it in a url query string. But my issue is not
    with an url query string, it's with an actual URL, that is,
    the actual name of the directory. It
    can't be "ça alors: it's a déjà-vu". But I
    want to allow the user to name their directory like that
    if they want. So I need a way to encode this into characters
    that can be used for an actual
    directory on the server.
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

  • Access the file from external system which is in the same LAN

    I have created technical system as standalone and given as my server name and attached to business system
    When creating comm. Channel giving path as “\foldername1\ foldername2\”
    Filename : “test.txt”.
    It is giving path does not exists.
    Is that the correct way to do access the file which is in the same LAN.
    Can any one help me on this.
    What path I should give exactly in the Comm channel..
    Thanks
    M

    Dear Murali,
    Try this
    a)Start transaction SXI_CACHE.
    b)From the context menu XI Runtime Cache select Start Complete Cache Refresh.
    If you still face issue try this .
    Many actions require to access System Landscape Directory content from the Integration Builder. To optimize performance, this content is loaded into a cache so that the System Landscape Directory does not have to be accessed directly each time that System Landscape Directory content is required.
    However, this cache is not automatically updated if changes are made to the content of the System Landscape Directory. For this reason that we delete the System Landscape Directory cache if changes have been made to content in the System Landscape Directory. The cache is then filled each time that the System Landscape Directory is accessed. If we log on to the Integration Builder after we have made a change in the SLD, we do not need to delete the SLD cache.
    To clear the SLD cache, from the Integration Builder main menu, choose Environment ® Delete Cache for SLD Data.
    Once we have deleted the cache for SLD data, accessing objects in the SLD may take longer than usual initially.
    Regards
    Agasthuri Doss

  • How can i check the file  which is upload from  the server

    when upload the excel file from the server file to the internal table ,how can i check the data whether it accord with  the required condition .
    for example ,i want to upload the file which have the data whose type is pack, and it have three integer and  two decimal ,how can i check in my code.
    thanks,

    Hi Sichen,
    First upload the file, Then do ur validations and delete the records that doesn't satisfy ur requirements.
    Thanks,
    Vinod.

  • 25K+ Files which uses 30.5GB disk space - Is it safe to delete?

    I am running Oracle 10g on Windows Server 2003 and noticed that the folder D:\oracle\product\10.2.0\db_1\WIN2KSVR_DB1\sysman\recv\errors have 25K+ files which have 30.5GB folder size. Is it safe to delete these files?

    Please refer below MOS doc
    *DB Control directory ../sysman/recv/errors is filled up with xml files. [ID 732725.1]*

  • If i download any file which is prepare on microsoft office 2007 . The file have been download without extension of the prog. Means if files name is "1,docx" when i download from firefox it download in that form "1". after download i have to rename and gi

    If i download any file which is prepare on microsoft office 2007 . The file have been download without extension of the prog. Means if files name is "1,docx" when i download from firefox it download in that form "1". after download i have to rename and give the extension name is plz tell me the way that office files are compatible with it.
    == This happened ==
    Every time Firefox opened
    == when i download the office files

    In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
    To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

Maybe you are looking for

  • Error in report wizard

    Hi I have XMLP 5.6.2 installed i was creating a sample which is on otn http://www.oracle.com/technology/pub/articles/rittman-xmlpub.html here. in this sample when i had to create report in template builder (word doc ) using report wizard it took me t

  • OSB: Configuring business service for JMS Queue

    Hi, I want to produce messages into a JMS queue from OSB proxy service. I have created business service for the JMS queue. I also want to return Status code=200, Status Messgae=Success if the message is successfully inserted into the Queue. Kindly le

  • Need to display Information message in two lines - Alignment problem

    Hi all, In a screen program, I am trying to display an information/Confirmation message to confirm few things from user side. For this I am using POPUP_TO_CONFIRM FM. This FM enables me to display a text question. My question would be "'New Price  40

  • Dashboard & Mighty Mouse Scroll Ball

    I love the feature on my Mac that I can press the scroll ball down and my dashboard comes up instantly showing me the weather before I go to work. My mouse got dirty-the scroll ball wouldnt work going up, so I cleaned it. Rubbing alcohol and figure 8

  • Can i turn off the itunes auto importing feature?

    Whenever i burn a mp3 disc itunes automatically starts importing the songs, it would be a cool feature if the disc had songs on it that itunes didn't already have, i want to turn it off because it's annoying every time i load a mp3 disc into my compu