General  unix question

hi,
I want to mobe all files of extension .c to .ci .can we do it in single command .i know using a script we can do it.the command mv *.c *.ci won't work as shell expands * first.let me know if there is a way.
warm regs,
raj.

To rename all *.c files to *.ci in the current and all subdirectories, use:
# for i in `find . -type f -name '*.c'`; do mv "$i" "`echo $i | sed -e 's/\.c$/.ci/'`" ; done
Note 1: You should escape the dot in sed's expression as dot alone matches any one (!) character.
Note 2: Using double quotes around $i and the echo-command makes sure you won't run into problems if you have filenames with blanks.

Similar Messages

  • Oracle on Solaris - General UNIX Question

    Anyone have a way to list out the hidden (dotfiles) only on a Solaris box? ls -a shows both hidden and normal files I just want to list the hidden files and directories.
    Thanks

    it's hard to list only hidden files and directories at the same time.
    It's easier to use 2 commands one list hidden files like first poster did
    and
    ls -l | grep ^d | awk -F' ' '{print $9}'
    to list all directories.

  • A Unix question: find command

    Hi all,
    Sorry for posting a Unix question here.
    In the following directory I have:
    /opt/SonicSoftware/SonicMQ/samples/TopicPubSub/DurableChat>ls
    DurableChat.class DurableChat.java Readme.txt
    However, if I try:
    /opt/SonicSoftware>find -iname DurableChat.class
    The path can not be found, it just gives me the prompt back; I don't know what the reason is. Any idea?

    I'm just wondering can the symbolic link be the
    reason that class file can not be found (I guess, not
    though, b/c other classes can be found):What do you mean "not found"?
    Do you mean why the find command isn't finding it? Yes, that's why. But now that you know, you can use -follow.
    Or do you mean the VM is unable to find the class at runtime? I'm almost certain the classloader can follow symbolic links in the classpath, so I don't think that's the problem.
    >
    /opt/SonicSoftware/SonicMQ/samples/TopicPubSub/Chat>..
    /../SonicMQ.sh DurableChat -u AlwaysUp
    Exception in thread "main"
    java.lang.NoClassDefFoundError: DurableChat
    Should I change the path that it won't be symbolic
    anymore?Try it and see if it fixes it. I'd be surprised, but you never know. If making it not a link fixes it, then maybe that's what you have to do. If it doesn't fix it, then you know you have to look somewhere else.

  • Simple Java Command-Line on Unix Question

    From the windows shell, the following command works fine:
    java -classpath MyJar.jar;. Test
    The class Test, in the current director, depends on files in MyJar.jar. However, when I open up the cygwin bash shell and try to execute the same command, I get this error:
    bash: /usr/bin/Test: No such file or directory
    It appears it's looking for Test in /usr/bin as opposed to in the current directory. Why is this happening and how can I get this to work in bash?
    I know it's kind of unix question, but I figured some one here could help.
    TIA,
    John

    How can I use aboslute classpaths within bash. For
    example, what it the bash equivalent of the
    following:
    java -classpath C:/Java;C:/Java/MyJar.jar Testjava -classpath /the/path/to/your/Java:/the/path/to/your/MyJar.jar Test
    Normally you will be using things relative to your home directory so yo can use
    java -classpath ~ /the/relative-path/to/your/Java:~/the/relarive-path/to/your/MyJar.jar Test
    or
    java -classpath $HOME/the/relative-path/to/your/Java:$HOME/the/relative-path/to/your/MyJar.jar Test
    Please don't use these blindly. Spend some time (half a day say) looking at the bash shell!

  • Anyone know of a good unix forum so i dont have to ask unix questions here?

    Anyone know of a good unix forum so i dont have to ask unix questions here?
    and how bout a good unix tutorial?

    what is solaris dev?
    What's wrong with asking unix questions. Anyways,if
    you go to the sun home page http://www.sun.com I
    think
    there is a solaris dev connection.
    What I meant was the solaris developer connection.
    Solaris is Sun's version of unix. just like this forum is part of the java developer connection I'm sure that they have a forum for unix.

  • General dreamwevaer question

    hello dreamweavers.
    im a newbie going to use dreamweaver from next week and beyond,so id like to ask the following:
    should i design the website in photoshop and then import it into dreamwevaer,in order to code it?
    is dreamwevaer flexible in design point of view,or is it mostly getting finished designs such as headers,footers,flash banners,
    and then building up the site where things so and such.
    thank you.

    Hello Nancy.
    seems like an informative website,i can see it is easy to understand the
    basics.
    Στις 23 Μαρτίου 2012 4:29 π.μ., ο χρήστης Nancy O. <[email protected]>έγραψε:
       Re: general dreamwevaer question  created by Nancy O.<http://forums.adobe.com/people/Nancy+O.>in
    Dreamweaver - View the full discussion<http://forums.adobe.com/message/4283588#4283588

  • "Batch" type script - maybe generic UNIX question!

    Hey peeps,
    We just set up an email filter on Solaris 9, which has 20MB of configuration files that need backing up on a regular basis. What I would like is a short executable script which does the following:
    tar -cf the config files into a tar file, named conf-backup-DATE.tar with todays date.
    open an ftp connection, with a specified username and password
    "put" the tar file on the ftp server
    disconnect from the ftp server
    I think this is more of a generic UNIX question than a Solaris question, but I don't know any more about UNIX than I do about Solaris anyway!

    Your script defines functions which will enable you to invoke the backup. But this script only defines functions. You need to invoke them for your backup to work. The sample invocation can look like this (CODE NOT TESTED!!!):
    Setup
    Initialize
    Gethottblspace
    BeginHotbackup
    Best Regards
    Krystian Zieja / mob

  • External Authentication general-type questions

    Greetings all,
    I was recently shown how to get Oracle to allow Windows NT Authentication the way SQL 2005 etc. can. I was able to get it working. It's actually simple, you just have to have this line in your SQLNET.ORA file:
    SQLNET.AUTHENTICATION_SERVICES = (NTS)
    and make sure a couple initialization parameters are set (OS_AUTHENT_PREFIX to NULL and REMOTE_OS_AUTHENT to TRUE - the first can't be changed once the database is built!).
    My first question is does Oracle support external authentications to operating systems other than NT, i.e. SUN, UNIX, LDAP etc? And is it a similar architecture?
    Secondly, the only ways I've ever connected to Oracle are 1) through SQL*Plus, 2) Using OLE DB from Windows and 3) Using ODBC.
    Is external authentication supported when logging in any way other than through OLE DB? If so, how?
    Appreciating any general information!
    Thanks
    Joe

    1. The name of the product is SQL Server not SQL. SQL is a language.
    2. Oracle supports all major forms of internal and external authentication. The ones you listed and many more. The docs are at http://tahiti.oracle.com
    3. External authentication is support across the board. But you've got to be working with a database holding nothing more important than your mother's cookie recipes to think that operating system authentication in a Windows environment is secure: It is not.
    Your first responsibility, unless you are just playing games at home or in school, is to secure the data and that means an environment more secure than the one you've chosen.

  • A few general agent questions

    We've been asked some general questions by our agents that I have been unable to find answers for, (although 4 and 5 are likely working as designed). We are running IPCC Express 7.0(1)SR05_Build504 and these are all phone agents. We do not run the agent desktop client. Any assistance in answering these questions would be greatly appreciated.
    1. TransfertoVM softkey "grayed out" while on a CSQ call. Can it be enabled?
    2. While logged in to CSQ, is there a way to start dialing prior to
    lifting the receiver?
    3. Is it possible to handle more than one CSQ call at a time, e.g. put a call on hold and answer
    another CSQ call.
    4. Upon selecting Agent Login (single-button login), can the agent automatically be put into Ready?
    5. Upon Logout, can the phone be returned to the main screen, rather than getting the manual agent login screen?
    Again, any assistance in answering these questions would be greatly appreciated.
    Thanks,
    Roger

    Hi
    1) Isn't that an IPMA softkey? Never tried it, but whilst it's not in the 'unsupported' list, I wouldn't expect using any IPMA features in conjunction with CAD would get you good results. If it doesn't cause you stuck/ghost calls, I would expect erroneous reports...
    2) Being logged into a CSQ doesn't affect the way the phone works.
    - You can dial the number then either lift the handset or hit dial (for speakerphone)
    - You can press speakerphone or headset then dial
    I guess what you are referring to is if you are using the IP Phone Agent in conjunction with a headset? If you are, then the IPPA usually obscures the 'new call' and 'end call' softkeys that you might use if you leave the headset button lit. I guess this isn't the case, as you refer to lifting the receiver? Unless you have motorized lifters.. If that's what you have, you can try getting users to either :
    - Manage their onhook/offhook state using the headset key as if it was the speakerphone key (i.e. press it to hang up or pickup)
    - Use a headset/phone combination that supports HHC
    - Switch to CAD, or CAD-BE if you can't install PC software for some reason.
    3) No. The system is designed specifically so that this should never happen.
    4) No.
    5) Again, no... you can't customize the BIPPA service... If you use CAD or CAD-BE this wouldn't be an issue.
    Regards
    Aaron
    Please rate helpful posts...

  • Workflow and General Use Questions

    Hello,
    I'll apologize right off the bat for these novice question because I'm sure the information is probably somewhere in the forum, I just haven't been able to find it. I just purchased Aperture after completing the demo as my library is getting too large to manage using standard file folders. I'm now trying to figure out the best practices for workflow and general use before I invest some serious time into importing and keywording all my pictures.
    1) Store files in the there current location, or in the Aperture Library? It seems to me that once they are moved to the Aperture library, you can only access them from within Aperture. I'm thinking I would be better off leaving them in their current location. For one, if I want to quickly grab a picture as an attachment to an email or something it seems easier to grab it from the standard folders. Second (and more important) I do not have room to keep all my pictures on my Macbook, thus most of them are stored on the Time Capsule.
    So... Keeping photos in their current location appears to be the best choice for me even though it adds an additional step every time I bring in new photos from my camera. Does this sound right?
    2) Is there a way to mark the photos that I have uploaded to my website (Smugmug)? Ideally, I would like to badge photos that have already been uploaded so I can quickly recognize them and ensure I'm not duplicating. I've considered using the rating, or keywords to indicate that a photo has been uploaded but both methods have disadvantages.
    3) Any suggestions for general workflow and organization resources (tutorials, books, websites, etc.)? I've looked at the videos on Apple's site but they obviously didn't get that detailed.
    Thanks for the help, sorry for the length.

    I recommend to Manage by Reference with Master image files stored on external hard drives (note that Aperture defaults to a Managed-Library configuration rather than a Referenced-Masters Library). Especially important for iMacs and laptops with a single internal drive. The workflow as described below in an earlier post of mine uses a Referenced-Masters Library.
    I feel pretty strongly that card-to-Aperture or camera-to-Aperture handling of original images puts originals at unnecessary risk. I suggest this workflow, first using the Finder (not Aperture) to copy images from CF card to computer hard drive:
    • Remove the memory card from the camera and insert it into a memory card reader. Faster readers and faster cards are preferable.
    • Finder-copy images from memory card to a labeled folder on the intended permanent Masters location hard drive.
    • Eject memory card.
    • Burn backup hard drive or DVD copies of the original images (optional strongly recommended recommended backup step).
    • Eject backup hard drive(s) or DVDs.
    • From within Aperture, import images from the hard drive folder into Aperture selecting "Store files in their current location." This is called "referenced images." During import is the best time to also add keywords, but that is another discussion.
    • Review pix for completeness (e.g. a 500-pic shoot has 500 valid images showing in Aperture).
    • Reformat memory card in camera, and archive originals off site on hard drives and/or on DVDs.
    Note that the "eject" steps above are important in order to avoid mistakenly working on removable media/backups.
    Also note with a Referenced-Masters Library that use of the "Vault" backup routine backs up the Library only, not the Masters. Masters should be separately backed up, IMO a good thing from a workflow and data security standpoint.
    Max out RAM in your MB and keep the internal drive less than 70% full.
    Good luck!
    -Allen Wicks

  • General log4j question I can't answer myself

    I have developed an app using Eclipse that uses log4j and everything seems to work fine. But when I copy the code to our Unix box and run it with Ant (just upgraded to 1.7 if that makes a difference), all the logging gets redirected to stdout. It WAS working at some point, but now I can't seem to get it to work correctly and I think it has something to do with the location of my log4j.properties file. Where does this darn thing go? I jar the project if that makes any difference.
    Should it go in the same directory as the Main class? same dir as the base dir? current dir? Inside the jar? outside? etc...
    my directory structure is:
    ls .
    build.xml
    classes (dir)
    build (dir)
    src(dir)
    ls build
    MyProgram.jar
    so I call Ant from .
    And as a second question, does eclipse do any voodoo to get the pull the config file?

    I have developed an app using Eclipse that uses log4j
    and everything seems to work fine. But when I copy
    the code to our Unix box and run it with Ant (just
    upgraded to 1.7 if that makes a difference), all the
    logging gets redirected to stdout. It WAS working at
    some point, but now I can't seem to get it to work
    correctly and I think it has something to do with the
    location of my log4j.properties file. Where does
    this darn thing go? I jar the project if that makes
    any difference.
    Should it go in the same directory as the Main class?
    same dir as the base dir? current dir? Inside the
    jar? outside? etc...Question the first: What are we talking about here, a web app, desktop (swing) app or something else?
    >
    my directory structure is:
    ls .
    build.xml
    classes (dir)
    build (dir)
    src(dir)
    ls build
    MyProgram.jar
    so I call Ant from .
    And as a second question, does eclipse do any voodoo
    to get the pull the config file?No it doesn't. It only does what you tell it to though you may do so inadvertantly.
    The rough answer to your first question is that it doesn't really matter so long as the file system can find it. Likely this can be corrected with a handy path entry though you need to be wary that you don't have multiple files referenced in your path that have the same name.
    Knowing more about what you're deploying, and how you're deploying it would be helpful in trying to give you better answers.
    PS.

  • General BADi question:Call BADi in background job/batch input. Possible?

    Hi out there,
    i'm using thoe following BADi: /SAPSLL/CTRL_SD0C_R3 (Global Trade Service).
    But also, this question is a general question.
    If we are calling on screen the transaction VF01, the BADi is called correctly.
    But unfortunately it seemes that the BADi is NOT called (im not really sure, cause i can't debug the background task) when we are calling a batch input sequence wth f.e. form bdc_transaction VF01 nothing happens.
    Maybe BADi cannot be called in a background task? If it's possible, how could it be monitored. Thare isw no spool entry or anything like that!
    Any answer can help.
    Thank you in advance!
    Regards,
    Timo
    Edited by: Timo Ehl on Apr 14, 2009 7:27 PM

    Hi,
    generally BADIs are called in background mode. You can use the following trick to debug your BADI. You just need to create an infinite loop in your BADI implementation. Something like this.
    DATA: l_a TYPE c.
    WHILE l_a IS INITIAL.
    ENDWHILE.
    Obviously when your BADI is called in background mode then program will get into infinite loop. You can easily connect and debug running programs from transaction SM50. You need to select your background process and go to Program/Session -> Program -> Debugging. You will jump directly into your BADI methos with infinite loop. Then you will just set value to l_a and you will start debugging your BADI. If you can not find any process then your BADI is not called in background mode.
    Cheers

  • A general OOP question

    Hi
    I have a general OOP design question, and am wondering if someone could relate an answer to the following design?
    I have a class called MediaFolderImport(); - it's designed to build a window with various editing tools in it.
    Within it's constructor, I'm calling a bunch of functions to build the window...
       createTitle();
       createInstructions();
       createToolPanel();
       createDataGrid ();
       createOpen();
       createSave();
    In my document class, I instantiate it...
    public var File_Folder_Import:MediaFolderImport=new MediaFolderImport();
    and then...
    addChild(File_Folder_Import);
    Voila! - the window appears. I WAS very proud of myself.
    Now I want to access something inside the window.  Specifically, there's a radio button that was created in createToolPanel(); - I want to update it to be selected or not selected when I receieve the user's preference from an xml settings file at start up (xml is loaded into the doc class).
    General question:
    What is the best practice, smart way to have designed this?
    - call createToolPanel(); from the doc class instead of within MediaFolderImport();, and somehow (magically) have access to the radio button?
    - leave the design as is, but add some sort of listener within MediaFolderImport that listens for changes to the xml in the doc class, and updates accordingly?
    - do it the way I'm trying to, ie try to access the radio button directly from the doc class (which isn't working):
    File_Folder_Import.myRadioButton.selected = true;
    - a better way someone can briefly explain the concept of?
    Another way to explain my design is...
    - a bunch of different windows, each created by a different class
    - xml file loads preferences, which need to be applied to different tools (radio buttons, check boxes, text fields etc) in the different windows
    I read a lot of posts that talk about how public vars are mostly bad practice.  So if you are making your class vars private, what is the best way to do the kind of inter-class communicating I'm talking about here?
    I think someone throwing light on this will help me solidify my understanding of OOP.
    Thank you for your time and help.

    You're already very used to using properties for the built-in AS classes and that's the best practice means of configuring your class. It's a "state" that you want to simply expose. The get/set method moccamaximum mentioned is the ideal route.
    The main reason you want to use get/set functions is validation. You want your class to act properly if you send an invalid value. Especially if anyone else besides yourself is going to use the class. Plan for the worst.
    The general concept is, make a private variable for any 'state' you want to remember using an underscore in the variable name to easily identify it as a private var, then make get/set functions with the same name with any required validation without the underscore.
    e.g.
    package
         public class MyClass
              // property called 'mode' to track something with an int
               private var _mode:int = 0;
              public function MyClass() {} // empty constructor
              // get (type enforced)
              public function get mode():int { return mode; }
              // set, requiring a value
              public function set isChecked(modeVal:int):void
                   // if no value is sent, ignore
                   if (!modeVal) { return; }
                   _mode = modeVal;
    Your validation will go a long way to easily debugging your classes as they grow in size. Eventually they should throw exceptions and errors if they're not valid. Then you will be best practice. Do note that if your validation requires quite a bit of logic it's common to upgrade the property to a public method. get/set should be reserved for simple properties.

  • Best Font for Subtitles? and other General Subtitling questions?

    I've never had to use subtitles, until my current project, so I am looking for some general advice and suggestions.
    I will be using PPCS3 (on XPpro) as the subtitles (as in the kind that translate a foreign language) will be permanent.
    So here are my questions:
    1. What is the best font and or what is the most standard font for subtitles? (Font size and other characteristics may be worth mentioning here too.)
    2. Is it possible to have an outline around the text as opposed to shadow?
    3. What are some general rules of thumb for subtitles that apply to broadcast and cinematic productions?
    Thank you.

    See also:
    FAQ:Why are my titles blurry/wrong?
    Cheers
    Eddie
    PremiereProPedia   (
    RSS feed)
    - Over 300 frequently answered questions
    - Over 250 free tutorials
    - Maintained by editors like
    you
    Forum FAQ

  • BOE- General Implementation Questions

    I recently joing a Medical Transportation Company which is currently using DB2 on AS400 and is in the process of moving to Mysql. The project that I'm incharge of is finding the right technology for web based report generation and making them accessible to end users to run their own reports on a day to day basis. Currently we have BOE on a very old computer with radom versions of Crystal software installed on 2-3 computers with out a report server.
    I would appreciate if someone could suggest what I need in order for me to create a separate BOE server and what are the pre-req's in order to do that. Any help is greatly appreciated.
    Please feel free to ask me questions if anything I asked is not clear
    Thanks
    Achett

    What version of BOE do you have? Anyway, BOE comes with Web Intelligence which is an excellent web-based reporting tool. It is very easy to use and very easy to learn, as long as the back-end data-mart and the universes are set up correctly.
    It depends on how many users the system is going to support, you should install it on a server. BusinessObjects is built for Windows first, and then extend to other Operating Systems later. Therefore, for optimizing performance and minimizing cost at the same time, you should use Windows Server. Windows servers are much cheaper to maintain than UNIX server, and Windows Admin are much cheaper in term of salary than UNIX Admin. So you do the math.
    The installation is quite straight-forward. You should read the Getting Started and the Admin Guide documentation first before you proceed. If you are stuck, you can always contact Tech Support if you have purchased the support contract. Otherwise, feel free to drop by again for questions.
    Hope this helps.

Maybe you are looking for

  • Windows 8.1 and IE11 - Critical Error: Object doesn't support property or method 'addEventListener'

    Our SharePoint 2010 sites don't work very well in Windows 8.1/IE11!! When opening list items or forms etc we get Critical Error : Object doesn't support property or method 'addEventListener'. It looks like it's possibly linked to InfoPath forms. Give

  • Mic not working after upgrading to Leopard

    Well I had an external mic on my iMac working fine with Tiger. I buy Leopard and upgrade... and all of a sudden it does not work anymore. Now I know that iMacs have a line in input and not a mic input, but it worked with Tiger so why should it not wo

  • Monitor for IMac is Faded and Blueish

    What is causing my faded and blue tintish display right now?

  • Can't get emctl to start on RAC

    hello - I have attempted to install EM DBConsole on a RAC cluster. I ran the setup, and at the end I got the message: SEVERE: Listener is not up. Start the Listener and run EM Configuration Assistant again . The listener is up and running: lsnrctl st

  • Stopping OS X from including "._" files on WebDav shares

    We are working with the content system in the new Blackboard 7.1 and are running into an issue. Whenever you copy or save a file from a Mac to the WebDav share, it also copies the "._" resource fork file (like it should since WebDav cannot handle res