Terminal commands not working.

Hey all, well it seems I've really messed it up. I've ventured into my first experience with database application programming using mySQL and have royally screwed up my Terminal. When I start up Terminal, the second line says: -bash: ps: command not found (the first line just says my last login). And that definitely did not happen before I started messing with it. I cannot do any of the normal commands like cd or ls or anything. I have no idea how to fix this, I've looked around on stack overflow and other sites like it but cannot find a solution that does me any real good.
I'm on a Retina MacBook Pro running Mavericks. 2.3 GHz Intel Core i7 Processor and 16 gigs of RAM.
I've tried to find a way to reset my Terminal by going to Library-Preferences-and trying to find that com.apple.Terminal.plist file but for some reason that's not even there. Maybe that's what my problem is? Anyway, any help is appreciated as I would love to get back up and running with database programming asap.
Thanks.

Problem solved! I messed with my .profile file and changed the path around a while ago when first starting with all this. I reverted back to the original .profile file and that fixed everything.

Similar Messages

  • Mac Terminal Commands not working

    A few months ago, I discovered the awesome Terminal App on my Mac and came to know of its great uses. But since yesterday, when I enter any command into Terminal, I get this response:
    -bash: $: command not found
    while all the commands I enter worked before! How to solve this problem?

    You're entering a command that starts with '$' by itself. That's a syntax error. It's hardly possible to overstate the danger of using the shell if you don't have a basic understanding of it.

  • Basic Terminal Commands Not Working

    I'm having trouble using basic commands in terminal that I've been able to use in the past. For example, if I type "dir," I get "-bash: dir: No such file or directory"
    I'm know sure what "bash" is, or if that has anything to do with it.
    I'm also trying to use the tar command, which I've not used before. Again, I get a similar error: "-bash: tar: No such file or directory"
    Hope you can help. Thanks!

    Here is an overview of the terminal commands.  Lets assume that your account has a short user name of mac.
    Macintosh-HD -> Applications -> Utilities -> Terminal
    #What is my short user name?  Type the whoami command.
    mac $ whoami
    mac
    mac $
    #How to list all of your disks.
    # The ls command is for list
    mac $ ls /Volumes/
    Audio CD       Macintosh-HD   Spotless       Tiger-ext
    mac $
      # Let's say your flash drive is named Spotless
    # cd is change directory
    mac $ cd /Volumes/Spotless
    # pwd is print working directory
    mac $ pwd
    /Volumes/Spotless
    mac $
      # The ls command is for list # l is long # F is type of file where / is directory mac $ ls -lF
    total 134704
    -rw-r--r--     1 mac  staff     64560 Mar  3  2009 A-picture-of-Youpi-key.png
    drwxr-xr-x    83 mac  staff      2822 Nov  7 14:52 Applescript files/
    drwxrwxrwx    12 mac  staff       408 Dec 13  2008 Christmas Cards/
    drwxr-xr-x     9 mac  staff       306 Dec 21 17:39 Christmas Cards 2009/
    ... trimmed ... What does all this mean?
    drwxrwxrwx
    d = directory
    r = read
    w = write
    x = executeable program
    drwxrwxrwx
    ||  |  |
    ||  |   all other users not in first two types
    ||  | 
    ||  group
    ||
    |owner

    What type of entery is this? d = directory, - = file, etc. 
    Every Unix resource: files, folders, etc has an owner, group, other 
    A Unix resource has one owner.
    A Unix resource has one group.  A group contains a list of users.
    To gain access to a file.  You can be the owner, in the group, or not being the owner or in the group you ended up as other. The owner, group, or other  has read, write, or execute permissions.
    # l is long
    # a is all to show hidden files & folders
    mac $ ls -lFa
    total 134736
    drwxr-xr-x    41 mac   staff      1496 Dec 22 17:11 .
    drwxrwxrwt     8 root  admin       272 Dec 24 13:55 ..
    -rwxrwxrwx     1 mac   staff     15364 Dec 23 12:52 .DS_Store*
    drwx------     4 mac   staff       136 Jan 22  2009 .Spotlight-V100
    drwxrwxrwt     5 mac   staff       170 Sep 14 16:36 .TemporaryItems
    d-wx-wx-wx     4 mac   staff       136 Dec 31  1969 .Trashes
    -rw-r--r--     1 mac  staff     64560 Mar  3  2009 A-picture-of-Youpi-key.png
    drwxr-xr-x    83 mac   staff      2822 Nov  7 14:52 Applescript files
    drwxrwxrwx    12 mac   staff       408 Dec 13  2008 Christmas Cards
    drwxr-xr-x     9 mac   staff       306 Dec 21 17:39 Christmas Cards 2009
    ... trimmed ...
    # mv is move or rename
    mv -i the-name the-new-name
    # You can just rename the file back to what it was with mv command.
    mv -i old-name new-name
    Here is what these commands mean:
    cd is change directory
    pwd is a print working directory
    ls is list
    sudo is Super user do
    mv is move or rename
    For cryptic comments, you can always uses the manual command which is man. For example:
    man mv 
    # Type the letter q to quit.
    In case you have spaces in your filenames or directories, you need to escape them. See examples: 
    mac $ ls -l ~/"see it"
    -rw-r--r-- 1 mac staff 3171 Oct 26 23:38 /Users/mac/see it
    mac $
    mac $ cd /Users/mac/Desktop/ttt\ html\ copy/
    Do you know about tabing? Type in a few letters of a name then press the tab key. The computer will type out the rest of the name if it is unique.
    Press the up arrow key to see the previous command(s).
    To edit a command, use the left arror key to more left and the right arror key to move right.  Use the delete key to delete the key to the left.  Type a letter to insert.
    history to see many previous commands. 
    mac $ history
        2  man launchd.conf
        3  history
    http://discussions.apple.com/thread.jspa?threadID=2692161&tstart=0 
    Robert

  • Terminal commands not working {clear, pico, etc..}

    After Upgrading to Snow Leopard I am trying to work out of the terminal (using git) and some of the basic commands are not working. Things like trying to use clear and pico to edit files return this error.
    -bash: clear: command not found
    my paths looks like this
    /usr/bin
    /bin
    /usr/sbin
    /sbin
    /usr/local/bin
    Can any one help me out with that? (I am new to the Terminal so putting things in laments terms would be appreciated)
    Thanks for any help!

    when i type the $ls -l `whereis clear pico nano` it gives me the same error,
    -bash: whereis: command not found
    and then it just lists the directory. but is i just do ls -l clear or ls -l pico it gives me responses that look like the ones you have posted...
    ls -l clear
    -rwxr-xr-x 1 root wheel 50768 May 18 2009 clear
    ls -l nano
    -rwxr-xr-x 1 root wheel 324320 May 18 2009 nano
    ls -l pico
    lrwxr-xr-x 1 root wheel 4 Oct 1 15:48 pico -> nano
    is this something where I can just copy the /usr/bin over from a friends computer? (one of my friends bought their computer[same one as mine] about a month after i got mine) or is that a no go? would that actually solve any thing or just cause more problems?

  • Terminal Command not working

    I am trying to run a .sh file to compile/make Slax OS work on a USB stick. I tried this code
    [quote]
    sh ./bootinst.sh
    but it returned with all of this, what does it mean, I am in the mounted flash drive directory
    [quote]
    egrep: /proc/mounts: No such file or directory
    egrep: /proc/mounts: No such file or directory
    egrep: /proc/mounts: No such file or directory
    egrep: /proc/mounts: No such file or directory
    egrep: /proc/mounts: No such file or directory
    Can't find device to install to.
    Make sure you run this script from a mounted device.
    Message was edited by: kmccmk9

    Did you see these?
    http://backtrack.offensive-security.com/index.php?title=Howto:USB_Stick
    http://www.slax.org/forum.php?action=view&parentID=1230

  • Crontab reboot command not working

    Crontab reboot command not working
    Greetings
    I am new at this so excuse any ignorant mistakes I might be making.
    I have a server (MM X.4.9) that I would like to restart every day in order to make sure no programmes are hanging etc. If a program is hanging is should force quit it. Using terminal I have entered the following command:
    sudo nano /etc/crontab
    Entered password
    Than I entered using tab between each sequence:
    15 13 1 1 * root reboot
    This was a test run and it did not reboot.
    Entering
    cat /etc/crontab
    I got:
    # The periodic and atrun jobs have moved to launchd jobs
    # See /System/Library/LaunchDaemons
    # minute hour mday month wday who command
    15 13 1 1 * root reboot
    What have I done wrong?
    Thanks

    Hehe, there you are experimenting with a "reboot" cron command and you are surprised it quit so fast. You are not going to find a "graceful" solution to shutdown dialogs.
    MSWord is a Java app, so it is especially important for the command to work that it doesn't get hung up on outer layers of the system. Especially stupid apps that use Java which is not well integrated. I believe Word has a 5 minute autosave, so you should be able to recover most of your document.
    This reboot command should be running around 2AM, when the average webserver has minimum traffic. If you feel the need to reboot during busier times of the day, I'd suggest you look at what's causing your applications to crash.

  • AppleShowAllFiles command not working on multiple Macs running 10.6.6

    I needed to restore a Time Machine cookie from a Mac and no matter what I could not display hidden files in finder (Therefore making cookie restoration a severe pain). The commands seem to no longer function properly in 10.6.6. I even tried the older version of the command with "-bool", but to no avail. I've tried on 3 different Macs running 10.6.6 and another running 10.6.6 server and am getting the same results (no change in hidden files after restarting finder). 10.5.8 and 10.6.3 has no problems toggling the hidden files though....
    2 of the Macs had the hidden files already hidden and the third has had hidden files visible since at least 10.6.3 and none of them will change the hidden files from the state they are currently in.
    Here is the command I've been using with out issues until now:
    # sudo defaults write com.apple.Finder AppleShowAllFiles YES
    # sudo killall Finder
    and then here are the other commands I also tried:
    # sudo defaults write com.apple.Finder AppleShowAllFiles TRUE
    # sudo killall Finder
    # sudo defaults write com.apple.Finder AppleShowAllFiles -bool TRUE
    # sudo killall Finder
    I tried running the commands and then restarting with no luck and tried restarting and then running the commands also with no luck. Terminal processes the command the same as it always has, no success or error message.
    I ended up using the "Secrets" pref. pane to be able to get into the hidden files so I could restore the Time Machine cookie but I can't figure out why the terminal command stopped working for me. Is it because of 10.6.6 or am I taking crazy pills? If anyone can duplicate this issue or has seen it before I would be very appreciative as "The Google" does not seem to have the answers I seek.
    Thanks!

    Wow Baltwo that was a fast correction on that applescript syntax, thanks! The applescript worked, but that made me even more frustrated as the applescript is using the same command just with a boolean instead.
    AND THEN, I noticed your comment about sudo not always being necessary. I've never had any ill effects from using too much sudo on linux boxes (excluding security and permissions issues that could arise) and was like "pffff.... sudo never hurt nobody" but that is not the case on mac and/or unix I guess. I dropped the sudo and everything works perfectly.
    So for forum searchers: If "sudo defaults write com.apple.finder AppleShowAllFiles Yes" doesn't work after restarting finder, drop "SUDO" and it will work.
    So thanks again baltwo, and don't worry about the TimeMachine cookies - that part I had no problems with - it's just restoring the local cookie to the network volume so TM can continue using the sparsebundle already there. I just couldn't get to the local cookie because it's hidden!
    As punishment for this problem being so easy to fix I will go let the users assault me with Blackberries and Vista laptops for one hour. Sigh...
    Edit 1 -- Linc Davis answered correctly while I was typing. Thanks Linc Davis as you are absolutely correct. I am a sudo abuser and never thought it was so bad
    Message was edited by: SteveMobs
    Message was edited by: SteveMobs

  • Alt ctrl c shortcut command not working in photoshop cc, it is opening Internet explorer (IE)

    In Photoshop CC 2014  Alt + Ctrl + C ( to open for canvas size dialog box ) command not working, it is opening Internet Explorer (IE)

    What version of windows are you using?
    See if the Internet Explorer shortcut has that keyboard shortcut assigned to it.

  • Bash commands not working after upgrade to Lion

    After upgrade, many BASH commands not working. For example, such a fundamental thing as "ls". 
    iMac20:bin a$ ls
    Launch of "ls" failed: the PowerPC architecture is no longer supported.
    What does it have to do with PowerPC? My computer is 2.66 GHz Inter Core Duo

    Linc,
    iMac20:~ a$ which ls
    /sw/bin/ls
    Also, I managed to look (using tcsh's ls-F command) into the contents of /usr/. Here's what I see there:
    [iMac20:/bin] a% ls-F
    [*          csh*        echo*       ksh*        mkdir*      rcp*        stty*       wait4path*
    bash*       date*       ed*         launchctl*  mv*         rm*         sync*       zsh*
    cat*        dd*         expr*       link*       pax*        rmdir*      tcsh*      
    chmod*      df*         hostname*   ln*         ps*         sh*         test*      
    cp*         domainname* kill*       ls*         pwd*        sleep*      unlink*    

  • Why is my BDC_CURSOR command not working to position the cursor?

    Why is my BDC_CURSOR command not working to position the cursor?  Here are the details regarding my issue.
    I am writing a BDC to mass delete routing material assignments using transaction CA02.  I am OK to navigate through the initial screen to go to the Header screen and from here I am OK to navigate to the Material Assignments screen.  But once here, I cannot get the BDC_CURSOR command to take me into the list.  Here are the commands I am using.  Please let me know what I may try differently.
    CA02 Material Assignment - Set position  <-- this resets list of materials to correct position
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'   '=ENT1'.
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.
    CA02 Material Assignment - Delete
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'MAPL-MATNR(01)'.    <-- this is not working to set the cursor into the list
      PERFORM bdc_field       USING 'BDC_OKCODE'  '=LOE'.             " trash can
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.
    CA02 Material Assignment - Green Check OK
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'   '=BACK'.            " check mark
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.

    Thank you for your reply.
    I had used SM35 to record.  However, I was not aware of the "create program" feature.  I had commented out a section from my previous post which I have now added back (latest code below).  But it still did not resolve the issue.
    When I execute with dismode = 'N', I get back error message "No batch input data for screen SAPLCZDI 1010".
    When I execute with dismode = 'E' (only show dynpros when error), it stops at the material selection screen without placing my cursor in the list.  I can then MANUALLY click to set the cursor position in the list, MANUALLY click the trashcan, it then uses my BDC command to respond to the popup asking "Do you want to delete", still leaving me at the material selection screen.  I can then MANUALLY click the green check (or enter), then it continues with the BDC to go back to the previous screen, and saves.  But it still will not place my cursor in the material selection list (SAPLCZDI screen 1010).
    Here is code used.  It is the second section of code labeled "CA02 Material Assignment - Delete" that is not working.
    CA02 Material Assignment - Set position
    this code functions to position the desired material to first in screen list
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENT1'.
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.
    CA02 Material Assignment - Delete
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 
                                    'MAPL-MATNR(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=LOE'.             " trash can
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.
    Acknowledge Pop-Up Screen
      PERFORM bdc_dynpro      USING 'SAPLSPO1' '0100'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=YES'.
    CA02 Material Assignment - Green Check OK
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=BACK'.            " check mark
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.

  • Odi os command not working with agentservice agent.

    dear all,
    odi os command not working with agentservice agent but with local agent it work fine.. and user is administrator.
    kindly solve it
    Regards
    Naseer

    Hi,
    you referred to oscommand, so are you executing a .bat fille? if yes, where exactly does the .bat file reside, local machine or on network share?
    Also, follow these couple of documents, they may be helpful to you.
    859215.1 and 424703.1
    Regards
    Srikanth

  • Illustrator Short Commands Not Working

    Hi Team,
    My illustrator CS6 short commands have stopped working.
    Any time I try to use any CMD + Key, illustrator will not react.
    This has been on going for a few months, I have tried resetting preferences but nothing has changed.
    If someone could please help.
    Thanks,
    Brandon

    Hi Jacob,
    I have tried resetting preferences and few other options.
    Anytime I press the CMD key the option at the bottom just changes from selection to direct selection, if that helps.
    Should I uninstall and reinstall illustrator?
    I no longer have my access key.
    Thanks,
    Brandon
    Date: Wed, 8 Jan 2014 15:39:58 -0800
    From: [email protected]
    To: [email protected]
    Subject: Illustrator Short Commands Not Working
        Re: Illustrator Short Commands Not Working
        created by Jacob Bugge in Illustrator - View the full discussion
    THS,
    You may try the following (you have tried/done some of them already) and see whether it helps (the following is a general list of things you may try when the issue is not in a specific file; 3) and 4) are specifically aimed at possibly corrupt preferences):
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press CtrlAltShift/CmdOptionShift during startup (easy but irreversible);
    4) Move the folder Other options (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
      http://www.adobe.com/support/contact/cscleanertool.html
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5994475#5994475
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5994475#5994475
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5994475#5994475. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Illustrator at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Why does default keyboard shortcut for show/hide baseline grid (opt+command+') not work?

    Why does default keyboard shortcut for show/hide baseline grid (opt+command+') not work?

    Here's where you need to change the settings: System Preferences > Keyboard > Keyboard Shortcuts:

  • Basic commands not working in terminal?

    I have been attempting to set up i2p on my computer, and noticed that terminal responded to any command, no matter how simple, with "Command not found".
    After doing a bit of research across support communities, it seems that my problem lies within my PATH settings, and I need to fix them in order to be able to use commands again. I've tried multiple suggestions seen here on the suppport forums but none have worked so far. When I input /bin/echo $PATH I get the following:
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/MacGPG2/bin:/usr/local/m ysql/bin
    Help!

    Do you have a backup of this disk?  If not, go get one of those now.
    Do you have a pointer to whatever directions or installer tools you were following or using?  (So we might see what's been suggested and the steps you've followed here.)
    Do other logins work?  If you log in as a different user and launch Terminal.app and try some commands, does that environment work?
    Your PATH looks OK  — you have the important bits /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin — and the rest of what's there shouldn't be relevent to commands such as ls, cat or mv, so the next question would involve whether the tools and files and directories themselves exist.
    Do explicit paths such as /bin/ls, /bin/cat or /bin/mv work as expected?  (Most of the core commands for the command line environment are located in /bin).  Try the following command:
    /bin/ls /bin
    That command should displaty ~37 common shell commands and tools.

  • Recover Accidentally Deleted Files in OS X via Terminal, "command not found"

    Hi!
    I am trying to recover a folder from the trash. It was deleted 30 min ago. The command I am trying to use is;
    Mys-MacBook-Pro:~ storedisk$ com.apple.Finder AppleShowAllFiles true
    And the response is;
    -bash: com.apple.Finder: command not found
    When I open any Terminal window I get this message, I don't know if this is relevant;
    Last login: Wed Nov 13 08:27:40 on ttys001
    I have found some similar replies on the forum but they do not seem to work in my case. I'm new to Terminal so I would really appreciate the help to find the cause and to resolve my problem.
    Thanks a lot!

    Thank you so much. This is the reply that I got;
    Mys-MacBook-Pro:~ storedisk$ ls -a .Trash
    .                                        Cherry Blossoms
    ..                                        FLiCKS
    .DS_Store                              Nicholas Nickleby (1977)
    13 Tzameti                              Robin Hood (2010)
    Catch-22 [1970]                              We Live in Public 2009
    Mys-MacBook-Pro:~ storedisk$ mv .Trash/FLiCKS .
    Mys-MacBook-Pro:~ storedisk$
    Mys-MacBook-Pro:~ storedisk$ mv .Trash/FLiCKS
    usage: mv [-f | -i | -n] [-v] source target
           mv [-f | -i | -n] [-v] source ... directory
    It is the FLiCKS folder that I am trying to retreive. Does this mean that I can retreive it? And if so, when I use the command mv .Trash/filename, where should it appear? Sorry for not fully understanding the instructions.
    I also tend to empty the trash cumpulsively, which is how this happened in the first place. Trying to empty the files already in the trash but accidentally having had this folder selected I emptied that and kept the files that I didn't want.
    The trash folder still has the size as if the folder FLiCKS is still in there though, if that makes any difference?
    Thank you for all of your help.

Maybe you are looking for

  • How to hide the Save Results Layout checkbox on the Create Saved Search pop

    I need to hide the Save Results Layout checkbox on the Create Saved Search popup. Can anyone tell me how to do it? This popup is used when the user is on a query (rendered by the af:query component) and they select click the "Save..." button. The hav

  • What is the best practice when distributing a desktop application which uses SMO

    I have a WPF application which installs a web site. One of the installation steps is to execute a number of SQL scripts which will install website's database. The database server is not necessarily the same machine as the product is installed - in mo

  • Shadow on Imac 20" screen

    Hi This happened about a year ago, but then stopped, but has start again recently. Intermittently, often, but not always, after it goes to sleep, or when turned on, there is a shadow on the screen that starts at the top, and gradually fades towards t

  • Configuration vendor evaluation

    Dear MM consultants I am facing problem in configuration of vendor evaluation. In Vendor evaluation 1) define weighing key i.e-1- equal weighting, 2 - unequal weighting 2)define criteria . here I created 1-price, 2-quality, 3- delivery, 4-service In

  • Text Scrambled in iTunes Store

    I have had this problem since downloading and installing iTunes 9. Here is how I fixed it (I hope. I haven't shut down and restarted, yet). Remove iTunes 9. Find an iTunes 8.2 version and install it. When you try to open it, it will say your music fi