A Guide on How to Use the Terminal?

hey all, i've been looking for a guide on how to use the command prompt in Lion and haven't  been able to find anything. i'm brand new to the OS X and would appreciate any help. i'd like to learn the different commands first instead of the GUI.
by the way, are there any guides on what to do in the first stage of setting up OS X on a mac mini?
thanks

I'd start here: Terminal 101.  Reading books on UNIX would be helpful too.

Similar Messages

  • How Do I Learn How To Use The Terminal?

    Are there any places to learn how to use the command line in Terminal?

    Whywutt,
    Thank you very much.
    Its appreciated.

  • HT201362 hi, please guide me how to use the down load function! I really facing problem when selected software but can't smoothly up load?

    Hi, we're any expert can teach me the best solution or software can easily down whatever good lecture or good movie can easily control and. Down loading. Very much thankful to you

    >> then I get a completely blue screen.
    That probably means that you're not looking at a bug in Photoshop, but a problem with a driver - and the most likely cause would be your video card driver.
    And sure enough, your video card driver is almost 2 years out of date.
    Please go to NVidia's website and get the latest driver - then follow their directions for installation (so you don't get bits of old driver left over).

  • Help using the terminal.

    I'm taking a survey course of languages and we are covering perl this week. I need to write perl script that will parse xml data, but I can't even figure out how to use the terminal.
    when I open the terminal I get this line(I subed out my name and username):
    firstName-LastName-MacBook-Pro:~ username$
    i have tried command from tutorials such as ls and that works, but I can't figure out how to run scripts from a file. I have tried a simple hello world app by typing:
    #!/usr/local/bin/perl
    print "Hello World!\n";
    in text edit saving it as hello.pl then I tried to type hello.pl in the terminal and it says
    -bash: first.pl: command not found
    can someone explain in simple terms how to run simple programs like this?
    thanks, aaron

    Thanks for the help. That was a lot of good information. I did have it saved wrong(as rich text).
    It is a common mistake, and I'm glad you avoided it.
    However I still could not figure out how to run first.pl. using ./first.pl and ~/first.pl
    The "chmod +x first.pl" step is need to mark the file as an executable. As previously suggested by etresoft and me, you can also just use "perl first.pl" and avoid the other configuration stuff.
    I downloaded fraise as you recommended. Can you guide me through the part were you said, "modify your PATH environment varialble so it includes a directory where you put your personal scripts." i did not understand what you meant by "Create the file .bash_profile in your home directory (you will need ls -a to see the file after you create it). In .bash_profile".
    Any file that begins with a period will be invisible to the Finder. And the 'ls' command will by default not show files that begin with a dot. "ls -a" will so all files in a directory, including those that begin with a dot. This was the Unix way of cutting down on clutter in a directory, by having 2 classes of file name, and the ones with a leading dot were then typically used for things like initialization files.
    In this case .bash_profile is a bash shell initialization file. By default Mac OS X Terminal sessions use the bash shell to service the commands you enter at the command prompt.
    However, a new Mac OS X account typically does NOT have a .bash_profile, so if you wish to customize various bash behaviors you would need to create the .bash_profile yourself.
    And as much as I happen to love the vim (and before that vi) text editors, they have a very steep learning curve, so I'm hoping that etresoft was being humorous when he suggested you should avoid a GUI text editor such as Fraise
    And besides, if you start down the vi/Vim path, it will only lead to text editor wars with the emacs uses of the world Since you are trying to get through a programming language survey course, perhaps you can skip the text editor debates until a later semester.
    With respect to PATH. PATH is a standard Unix environment variable that contains a list of directories that the shell (bash) will search when trying to find the executable file with the same name as the command you entered at the shell command prompt.
    If you do not modify your PATH environment variable, it generally looks like:
    echo $PATH
    /bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
    where each directory is separated by a colon (:). The shell will take the command name you entered, and search each directory from left to right until it find an executable file that matches your command.
    What I was suggesting is that you create your own personal directory where you put executable programs and scripts, and then add that personal directory to your PATH environment variable.
    Since the bash shell is going to read .bash_profile when you start a new Terminal session and execute the commands it finds in .bash_profile, that is the idea place to customize your PATH
    # Assuming you have created a folder called 'bin'
    # in your home directory, and you put your personally
    # created executable programs and scripts in there
    # then the following export command would modify your
    # PATH to include your personal bin directory. It does
    # not need to be called bin, that is just a long standing
    # Unix convention.
    export PATH="$PATH:$HOME/bin"
    After changing the .bash_profile, you would need to either restart your Terminal session or issue the command
    source ~/.bash_profile
    I'm a complete beginner when it comes to this stuff.
    your help is greatly appreciated.
    We all had to start somewhere. In my case the Unix command line prompt was a step up in usability
    ps. how to I enclose my code quotes like you did?
    Code segments (or anything you do not want the forum software to touch) are enclosed in an identical pair of tags. For example:
    ... your code snippit here ...
    And one final point. etresoft pointed out that the she-bang (#!) line was wrong. I find the following to be the most portable way to specify the #! line
    #!/usr/bin/env perl
    print "Hello World!
    /usr/bin/env is a POSIX standard program that must list in /usr/bin/env, and it will invoke the script interpreter specified as its single argument. /usr/bin/env will use PATH to find the script interpreter, so as long as perl exists in one of the directories specified by PATH, my above #! will always find it, no matter what Unix platform I copy my perl script to, or hand it in for a homework assignment (OK, it is been a lot of years since I did homework, but you might find it useful for your survey course).
    etresoft also suggested included the -w option in your #! line. That is not possible when using "#!/usr/bin/env perl", however, you can can just add the "use warnings;" statement to the your perl script and get the same effect:
    #!/usr/bin/env perl
    use warnings;
    print "Hello World!
    And if you want perl to look even close at your code you can change warnings to strict
    #!/usr/bin/env perl
    use strict;
    print "Hello World!
    {code}
    which makes perl really picky about your code.

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • How to use the structure in the EXIT_SAPMM06E_013 function module

    Hello Experts,
    Please guide me how to use the structure defined in function modules under  table tab in the driver program for smart form to fetch the data. Please post some sample code if available.
    Best Regards,
    Sandesh.Sreyamsh

    Can you please elaborate little bit more what is the actual requirement?

  • Hi my name is Vajra from INDIA, i am using ipod shuffle 3rd generation but it is not working properly due to battery problem, i need to change the battery please guide me how to change the battery or any chance to replace the ipod shuffle 3rd generation ?

    Hi my name is Vajra from INDIA, i am using ipod shuffle 3rd generation but it is not working properly due to battery problem, i need to change the battery please guide me how to change the battery or any chance to replace the ipod shuffle 3rd generation ?

    Seems no one care about us .no one replied till no@!!!!@ strange

  • Using the terminal????

    I am new to the hole MAC world and know very little about using its terminal. How do I write a command using the terminal to find a file? Also are there any good tutorials out there that I can study from? Thanks.

    Additionally, check the AppleScript and Unix forums under OS X Technologies. Note, that the default shell for OS X is bash. Check Terminal's help if you want to use another.
    Since you're new to Macs, these should help:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    MacFixIt Tutorials, and
    MacTips Learning Centre.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist.
    Welcome to the Switch To A Mac Guides, and
    A guide for switching to a Mac.

  • JNI - How to use the error reporting mechanism?

    I've developed a C++ DLL which is loaded from a commercial Win32 application (not written by me) as a plug-in for external calculations. On its initialization the C++ DLL launches the Java VM via the JNI invocation interface. When the DLL functions are called by the application, they forward the calls to Java objects inside the Java VM, again via JNI invocation interface.
    This works well, but I have encountered a weird error.
    From Java I open a JFrame containing a JTextArea as small console for debug output messages. If I turn output to this debug console off (my printToConsole routine checks whether a boolean flag is set), the string concatenation operator may lead to a crash of the Java VM.
    For example, if in one of the Java functions called from the
    DLL via JNI invocation interface the following is the first statement,
    it leads to a crash of the Java VM and the application that loaded the C++ proxy DLL.
    String test=""+Math.random(); // String test not used later
    Interestingly, if I comment this statement out, the Java code works fine WITHOUT any crash. I've already thought about potential races and synchronization issues in my code, but I don't see where this is the case. And the string concatenation error fails as well, if I insert sleep() statements in front of it and at other places in the code. However, if I turn on log messages printed to my JFrame debug console (containing a JTextArea), the String concatenation works without problems.
    So maybe the JNI interface has a bug and affects the Java VM; I don't see where my JNI code is wrong.
    One problem is that I do not get any stdout output, as the C++ proxy DLL is loaded by the Windows application, even if I start the Windows application from the DOS command line (under Windows).
    Does anyone know how to use the error reporting mechanism?
    http://java.sun.com/j2se/1.4.2/docs/guide/vm/error-handling.html
    Is it possible that the JVM, when it crashes, writes debug information about the crash into a file instead of stdout/stderr?
    My C++ proxy DLL was compiled in debug mode, but the commercial application (which loaded the DLL) is very likely not.
    I do not know hot to find the reason why the String concatenation fails inside the Java function called from the C++ DLL via JNI.

    Yes, I've initially thought about errors in the C++ code too. But the C++ code is actually very simple and short. It doesn't allocate anything on the C++ side. It allocates a couple of ByteBuffers inside the Java VM however via JNI invocation interface calls of env->NewDirectByteBuffer(). The native memory regions accessed via the ByteBuffers are allocated not by my own C++ code, but by the program that calls my DLL (the program is Metastock).
    The interesting thing is that everything works fine if output to my debug console is enabled, which means that in the Java print routine getConsoleLoggingState() returns true and text is appended to the jTextArea.
    static synchronized void print(String str)
    { MetaStockMonitor mMon=getInstance();
    if ( mMon.getFileLoggingState() && mMon.logFileWriter!=null) {
    mMon.logFileWriter.print(str);
    mMon.logFileWriter.flush();
    if ( mMon.getConsoleLoggingState() ) {
    mMon.jTextArea1.append(str);
    Only if output to the JTextArea is turned off (ie. getConsoleLoggingState()==false), the crash happens when the FIRST statement in the Java routine called via JNI invocation interface is a (useless) String concatenation operation, as described above.
    String test=""+Math.random(); // String test not used later
    Moreover, the crash happens BEFORE the allocated ByteBuffer objects are accessed in the Java code. But again, if console output is turned on, it works stable. If console output is turned off, it works when the (useless) String concatenation operation is removed in the Java routine called from C++.
    I've already thought about potential races (regarding multiple threads), but this can be ruled out in my case. It almost appears as if the JVM can have problems when called by the invocation interface (I tested it with Java 1.4.2 b28).
    All the calls between C++ and Java go ALWAYS in the direction from C++ code to Java. Unfortunately, there is no special JRE version with extensive logging capabilities to facilitate debugging. And the problem is not easily reproducible either.
    JNIEnv* JNI_GetEnv()
    JNIEnv *env;
    cached_jvm->AttachCurrentThread((void**)&env,NULL);
    fprintf(logfile,"env=%i\n",env);
    fflush(logfile);
    return env;
    // function called by Metastock's MSX plug-in interface
    BOOL __stdcall createIndEngine (const MSXDataRec *a_psDataRec,
    const MSXDataInfoRecArgsArray *a_psDataInfoArgs,
    const MSXNumericArgsArray *a_psNumericArgs,
    const MSXStringArgsArray *a_psStringArgs,
    const MSXCustomArgsArray *a_psCustomArgs,
    MSXResultRec *a_psResultRec)
    a_psResultRec->psResultArray->iFirstValid=0;
    a_psResultRec->psResultArray->iLastValid=-1;
    jthrowable ex;
    jmethodID mid;
    JNIEnv* env=JNI_GetEnv();
    jobject chart=getChart(env, a_psDataRec);
    if ( chart==NULL) {
    return MSX_ERROR;
    jobject getChart (JNIEnv* env, const MSXDataRec *a_psDataRec)
    jthrowable ex;
    jmethodID mid;
    int closeFirstValid, closeLastValid;
    closeFirstValid=a_psDataRec->sClose.iFirstValid;
    closeLastValid=a_psDataRec->sClose.iLastValid;
    long firstDate, firstTime;
    if (closeFirstValid>=1 && closeFirstValid<=closeLastValid) {
    firstDate = a_psDataRec->psDate[closeFirstValid].lDate;
    firstTime = a_psDataRec->psDate[closeFirstValid].lTime;
    } else {
    firstDate=0;
    firstTime=0;
    jclass chartFactoryClass = env->FindClass("wschwendt/metastock/msx/ChartFactory");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find class ChartFactory\n");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetStaticMethodID(chartFactoryClass, "getInstance", "()Lwschwendt/metastock/msx/ChartFactory;");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getInstance()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject chartFactory=env->CallStaticObjectMethod(chartFactoryClass, mid);
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getInstance()");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetMethodID(chartFactoryClass, "getChartID", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIIIIII)F");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getChartID()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject symbolBuf=env->NewDirectByteBuffer(a_psDataRec->pszSymbol, strlen(a_psDataRec->pszSymbol) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate symbolBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityNameBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityName, strlen(a_psDataRec->pszSecurityName) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityNameBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityPathBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityPath, strlen(a_psDataRec->pszSecurityPath) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityPathBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityOnlineSourceBuf=env->NewDirectByteBuffer(a_psDataRec->pszOnlineSource, strlen(a_psDataRec->pszOnlineSource) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate onlineSourceBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    // Java Function call leads to crash, if console output is turned off and
    // the first statement in the Java routine is a (useless) string concatenation.
    // Otherwise it works stable.
    jfloat chartID=env->CallFloatMethod(chartFactory, mid, securityNameBuf, symbolBuf,
    securityPathBuf, securityOnlineSourceBuf, (jint)(a_psDataRec->iPeriod),
    (jint)(a_psDataRec->iInterval), (jint)(a_psDataRec->iStartTime),
    (jint)(a_psDataRec->iEndTime), (jint)(a_psDataRec->iSymbolType),
    (jint)firstDate, (jint)firstTime );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getChartID()");
    printSBufViaJava(sbuf);
    return NULL;

  • How to use the CMS functionality in Sun Portal Server 7.2

    Hi All,
    How to use the CMS functionality using the ccd.war(Portlet) which is available in the library as i could add it to my channel but not able to show the functionality as it is showing the error msg "You are currently not logged in. Please login." should I create userid and there respective roles inorder to use the CMS functionality.
    Has any one used this as I could this in glass fish server.
    Any Input is appreciated.
    Thanks & regards
    Srikanth

    Have a look at the "*Roles*" section of the portal server 7.2 content management system guide
    http://docs.sun.com/source/820-4275/index.html . You can also look at [project mirage|https://mirage.dev.java.net] for some screencasts
    Alternatively,
    1. ccd.war has 3 portlets in it:
    (a) custom content definition portlet
    (b) custom content portlet
    (c) workflow portlet
    2. Inorder to work with these portlets, user needs to be in anyone of the below roles:
    (a)Consumer (b) Editor (c) Approver (d) Administrator (e) Submitter (f) Contributor (g) Publisher
    3. By default ccd.war gets deployed using a default roles file (/var/opt/SUNWportal/tmp/ccd.roles.properties)
    Note: In windows, you may not find this file
    4. Access the portlets as a user in any of the role mentioned in the ccd.roles.properties
    (OR)
    you can use a new roles file which has mapping to your custom roles. For this , undeploy existing ccd.war and deploy again with a new roles.properties file
    Hope this helps!

  • HOW TO: Use the XML parser in Oracle 8.1.7

    I am trying to figure out how to use the xml parser provided in oracle 8.1.7. all i want to do is parse a xml report that is defined using a schema, and place the data into the proper tables. i am totally unfamiliar with the xml parser and how it works. i have done some reading on the subject, but seem to be getting some conflicting infromation about which utilites i need and how to invoke them. can someone please tell me what utilities i need, how to invoke them, and what i need to do to get a xml document to parse and insert to a table? I would greatly appreciate any help anybody could offer. thanks.

    You can parse the XML Document with XML Parser and place the data into database using XSU(XML SQL Utility).
    Both of these are included in XDK for Java at:
    http://otn.oracle.com/tech/xml/xdk_java
    The following document could also help:
    Oracle9i XML Developer's Guide--XDK [PDF] at http://otn.oracle.com/tech/xml/doc.html

  • How to use the prompted value in the filter expression

    Hi
    Is it possible to use the prompted value in the filter expression?
    My requirement is that user will be prompted for a date field and I need to filter the records such that the records are displayed for the last 5 weeks from the date entered by the user.
    If somehow I know how to use the prompted value in the filter expression then this requirement is easy to be done. If this is possible, please guide me?
    If there are other ways to acheive the desired results then please suggest.
    Thanks
    -Jaz

    Edit: example added
    SQL> create table tb_test
      2  ( id number(5)
      3  , tot number(5)
      4  , mon_tot number generated always as (tot*15) virtual
      5  );
    Table created.
    SQL> insert into tb_test (id, tot) values (1, 5);
    1 row created.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1          5         75
    1 row selected.
    SQL> update tb_test
      2  set    tot = 15
      3  where  id = 1;
    1 row updated.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1         15        225
    1 row selected.

  • Please guide me how to delete the OLD claimed trip details

    Hi SAP Gurus
    We have corrected the all the cliams by newly created an posted properly today , how ever they are struck now and since they are form old employees (2007-2008) , few are still active / terminated/ retiree staus cant delete them nor make it zero. But appear in our report as pending...
    Please guide me how to delete the old trips.. your support really appreciated..
    Thanks
    Shan

    Hi Shan,
    As per my knowledge, no table should be deleted. Check the below link for more info.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/73/6bf037f1d6b302e10000009b38f889/frameset.htm
    <<removed>>
    Thanks,
    Praisty
    Edited by: Matt on Jul 26, 2011 3:11 PM

  • How to use the cases in button action?

    Hi Experts,
    I want to get a prompt message if the field is empty.I got it but at the same time if the field is filled I want the other action to be performed that is to call a BAPI and give me output.How can I give two events for the same action.
    How to use the cases in button action?
    So, please guide me.Urgent need
    Regards
    Nutan

    Hi Nutan,
    if I understand you, then you have a simple validation. Therefore you can use the validation functionality of VC for your components. An alternative could be by writing a new ABAP RFC function module like:
    BAPI Input parameters as input and BAPI output parameters as output and an additional return code or string for a message:
    IF I_FIELD IS INITIAL.
      E_RETURN_CODE = "THE FIELD IS EMPTY."
    ELSE.
      CALL FUNCTION <YOUR_BAPI>
      <BAPI PARAMETERS>
    ENDIF.
    I hope that helps.
    Best Regards,
    Marcel

  • How to use the eventing and databag with a WAS 6.20 ?

    How to use the eventing and databag with a WAS 6.20 ?
    Is what there is a good guide for these services?
    Thank's

    In the raise event you can pass the value
    like below.
    <SCRIPT>
    function raiseEvt(value1){
    if(window.document.domain == window.location.hostname){
    if ( document.domain.indexOf(".") > 0 ) document.domain = document.domain.substr(document.domain.indexOf(".")+1);
       EPCMPROXY.raiseEvent( "urn:com.sap:BWEvents","BWiViewevent", value1, null );
      // alert('tree domain'+document.domain);
    </SCRIPT>
    and in the
    subscribe event you can get the values like below.
    <script language="javascript">
    if(window.document.domain == window.location.hostname){
    document.domain = document.domain.substring(document.domain.indexOf('.')+1);
        EPCMPROXY.subscribeEvent("urn:com.sap:BWEvents","BWiViewevent", window, "myreceiveEvent");
    function myreceiveEvent( eventObj ) {
          document.forms[0].gp_hidden.value = eventObj.dataObject;
    </script>
    Also look at the following link for a complete documentation.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/Enterprise%20Portal%20Client.pdf
    Regards
    Raja

Maybe you are looking for

  • Licensing Office Home and Business 2013

    I know this has been talk about a bit... If I have 30 users to setup with Office 2013 H&B, do you recommend I setup a Public folder on my Exchange server, mail enable it, create a Microsoft account for the PC(email addr to match an SMTP alias of that

  • Incentives calculation

    Hi, Requirement as follows TARGET SALE SALE RETD NET SALE %OF ACHIEVEMENT RATE OF INCENTIVE Sale is a restricted Keyfigure which is defined as follows 0DOC_CATEG(Sales document category) restricted to Debit memo 0NETVAL_INV(Net value of billing item)

  • Wrong ordering of fotoalbums and lists in the explorer and some games.

    Since iOS 6 the fotoalbums and some lists in the browser and games are not anymore in the right order (e.g. a-b-c-d-m-n-o-p-e-f-g-r-s-t-u-....) What can I do?

  • Regarding a method used

    Hi, I was going through a tutorial. There they have used row.approve() for a row of a View object. I want to know what is the use of approve() method Is it a predefined or user defined method Thanks

  • Zooming in under FCP 5.1?

    I'm looking for a plugin to allow me to zoom in on sections of a clip and blow them up to full resolution. I'm working only in SD at the moment. Is there a plugin I could buy anywhere or can FCP do this natively? Thanks Mac Pro   Mac OS X (10.4.8)