Lost terminal BASH commands

http://discussions.apple.com/forum.jspa?forumID=758&start=0
I found this topic above but believe it's assuming things that I do not know. Since I cannot reply to it, I'm starting another thread.
I've changed to bash using Netinfo but have lost the default commands.
Here is the contents of my .bash_profile:
. ~/.bashrc
ENV=$HOME/.bashrc
export ENV
Where would the default commands go?
Where would I place additional commands/applications?
thanx, sam

http://discussions.apple.com/thread.jspa?messageID=3511247&#3511247
is the link I meant to copy (thought I did that correctly)
By "default commands" I meant ls -al, etc.
/bin/echo $PATH yielded an older path to mysql.
When I emptied the file, I got the defaults:
/bin:/sbin:/usr/bin:/usr/sbin
which I now have gotten back, thank you.
Now my follow-up, is what is the structure to add more, say mysql, ruby, etc?
Is there a comment character that can work on a line basis?
Should I just separate all these with a colon?
Or just add as a separate line?
thanx, sam

Similar Messages

  • Where can I find the LOG file for bash/command history typed into Terminal?

    Where can I find the LOG file for bash/command history typed into Terminal?
    For 2 weeks ago I was searching for a log file on my server. Somehow I opend a file where I could see a list of all bash-commands I had ever entered into OSX Terminal.
    Now I need this file.. but cant find it.
    What is the official location for this LOG file?
    Thank you so much for helping.

    cat .bash_history

  • Lost Excel document- 'Terminal Bash' suddenly appeared

    Can anyone help???
    I have been working on an excel (Office for Mac) spreadsheet for a week. I have been saving it on my work network which I access from home through 'Shared' on Finder. I finally finished it tonight and saved it but wanted to rename the file. Instead of doing 'Save As' I double clicked file name and re-entered text. However, I think I accidentally used a character which shouldn't be used in filenames "/" and when I clicked enter, the excel file icon and the contents of the document disappeared, to be replaced in the finder window by a black box icon which i believe is a 'Terminal Bash' window. The file is empty.
    Does ANYONE know how I might recover the document? My job might depend on it!!!!

    I don't know if this will help, but - under spotlight, type anything that was in the title, or even .xls if you want to look at EVERYTHING. Click on show all. When that window comes up, you can choose to search your mac or shared. Good luck.

  • Accessing Bash Command on Lion OS X.

    Hello Apple Forum Community.  Can anyone help me to understand how you access Bash in Lion (through which Utilities)?  If you are not a professional programmer or developer, is Bash command still worthy of being educated about on your Mac?  A website was describing a Bash command prompt for UNIX passwords; hence, could using Bash to generate and/or organize your passwords be your best bet?  Should we really trust 'random password generator' websites to create UNIX passwords, or are we simply wasting our time if we are really not creating the proper password for our Lion OS X. 
    What other functions can Bash be useful for?  Are there a few simple ways to know and/or get into Bash (to know a few advantageous command prompts) for the general Mac user.  Are any Bash commands different for OS X Lion, or are there new ones as well? Thanks.

    Open Applications->Utilities->Terminal.
    I believe the default shell for at least the last few releases is bash, so you'll get straight to it (though I have mine set to tcsh). If not, just type /bin/bash to start a bash shell.
    Random password generator sites are fine  - all they do is generate a random sequence of characters. However, you're probably going to have to write that password down to remember it, which makes it less secure. Better to come up with a sequence that has some mnemonic meaning to you, that contains uppercase and lowercase letters, numbers and other characters, and is at least eight characters long.
    I doubt there's any need for the "general Mac user" to be using a shell, but if you are interested in programming or getting to know how the OS works "under the hood", then it's worth learning about. There are any number of good resources on the web about UNIX shells.

  • Bash command not working

    After an update from leopard to lion my bash command clear does not work.
    If I open terminal and type clear this happens...
    Last login: Wed Jul  4 19:07:27 on ttys000
    You have new mail.
    pancake:~ machinename$ clear
    Launch of "clear" failed: the PowerPC architecture is no longer supported.
    pancake:~ machinename$
    I have tried to copy a copy of the terminal app from another functioning machine running lion, but when it runns on the upgraded machine the result is the same.
    How can I fix this?

    Sorry I better correct some of the info.
    My bash command clear does not work.
    If I open terminal and type clear this happens...
    The machine was bought with Lion preinstalled and the Migration Assistant was use to transfer everything for a user from a Leopard machine.
    Last login: Wed Jul  4 19:07:27 on ttys000
    You have new mail.
    pancake:~ username$ clear
    Launch of "clear" failed: the PowerPC architecture is no longer supported.
    pancake:~ username$
    When attempting to delete the terminal program on the system it is prevented with the message:
    “Terminal” can’t be modified or deleted because it’s required by Mac OS X.
    I then copied a terminal program from another Lion machine but it shows the same message for the command Clear on this machine, but not the machine it was copied from.
    Any ideas is greatly appreciated...

  • 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*    

  • I've lost some keyboard commands and can't get them reset!

    I seem to lost some keyboard commands in Photoshop CC. For example... I used to be able to use the Spacebar to temporarily access the Hand Tool - no matter what tool was selected. Now it doesn't do anything. I used to be able to use "Command + Spacebar" to temporarily access the Magnify Tool. This no longer works either. I've reset Default Preferences with no luck. I've also looked through the Keyboard Shortcuts & Menus screen, but it will only let me use (or change) a single keystroke to access a tool. What happened to the ability to TEMPORARILY ACCESS specific tools? I can still use the keyboard combinations mentioned above on my computer at home, but can no longer use them on my computer at work. Does anyone have any suggestions?

    You said, "I've reset Default Preferences." Are you referring to Cmd+Opt+Shift? If not, try that reset: Close Photoshop. Now press and hold Ctrl+Alt+Shift as you initiate Photoshop startup. Select "yes" when asked if you would like to reset.
    Benjamin

  • Bash command doesn't work after update

    I just ran pacman -Syu as normal, but some got many errors like below:
    ( 3/11) upgrading binutils
    error: command failed to execute correctly
    and every package except kernel-headers got a error message like that. and then i found most of my bash command doesn't work any more, just like ls and vim. However, some others like pwd and cd still work correctly.
    Any one any ideal?
    Last edited by ranjiao (2009-11-12 13:26:01)

    ranjiao wrote:I removed /lib64 and make a soft link from /lib64 to /lib, as Matlab09 requires a /lib64 containing crt libs.
    is this the cause?
    Yes.
    I've done that before and got into the same problem when updating glibc, the lesson here, don't mess with the default directory structure.

  • My Mac has lost the keyboard command to zoom in and out (Apple/shift/ /-)  How can I restore this?

    My Mac has lost the keyboard command to zoom in and out (Apple/shift/ /-)  How can I restore this?

    try doing an SMC reset, the following article tells how to do this:
    http://support.apple.com/kb/HT3964
    also go into your keyboard options and make sure the settings are correct there.

  • Where is the terminal "last" command getting it's information from?

    I searching for the information that the terminal "last" command holds.
    When I execute the "last' command...... I am seeing too little to be real..... something is up..... I need to determine when the information was deleted.
    What log file is the last command using? In Mt. Lion, in Lion, in Snow Leopard?
    Thanx for your help

    For those who are reading this, this is about a Mt. Lion system with current patches 10.8.3
    Thank you for the reply and the pointer to the audit directory.
    I am continuing to ponder why last at the terminal is given unexpected behavior. I am now noticing the history in last is only for the "last" - no pun intended - 24 hours or there abouts on one of my systems. In the audit directory there are many more entries
    Wed Mar 20 09:47:14 terry@mymac:~ >>last
    terry   ttys001                   Wed Mar 20 09:47   still logged in
    terry   ttys000                   Wed Mar 20 09:47   still logged in
    terry   console                   Wed Mar 20 09:41   still logged in
    reboot    ~                         Wed Mar 20 09:39
    shutdown  ~                         Wed Mar 20 09:39
    terry   ttys001                   Wed Mar 20 09:03 - 09:13  (00:09)
    terry   ttys000                   Wed Mar 20 09:03 - 09:13  (00:09)
    terry   console                   Wed Mar 20 09:03 - 09:39  (00:35)
    reboot    ~                         Wed Mar 20 09:00
    wtmp begins Wed Mar 20 00:56
    >>sudo ls -lsa /var/audit/
    256 -r--r-----
    1 root  wheel   130862 Nov 24 14:52 20121124213110.20121124225215
      56 -r--r-----
    1 root  wheel
    26733 Nov 24 15:23 20121124225256.20121124232301
      40 -r--r-----
    1 root  wheel
    19634 Nov 24 15:43 20121124232348.20121124234351
    and then DOZENS and DOZENS more.... and finally those for yesterday are missing and then today.
    2016 -r--r-----
    1 root  wheel  1031355 Mar 18 23:31 20130318150701.20130319063139
    840 -r--r-----
    1 root  wheel   426232 Mar 20 00:56 20130319154442.20130320075621
      56 -r--r-----
    1 root  wheel
    26259 Mar 20 09:39 20130320160056.20130320163908
      40 -r--r-----
    1 root  wheel
    19050 Mar 20 09:55 20130320163956.not_terminated
    Also when I look thru the list of audit file  the 15th and the 10th of Mar are missing..... hummmmm...
    Any idea what could cause this?
    I am suspicion of some sort of hacking but just see any direct evidence of it ....
    I have gone an gotten the source code for last at the BSD project but Im' not a c programmer and apple's version is a branch or so it seems to me cause they've got to be different and I'm not sure where to configure last or how to better understand what I'm seeing.
    Anyone care to help me understand what could be going on?

  • BASH Command.

    How can i use BASH commands to get files Added on a certain month?
    (I can use only date,ls,cut,awk,sed).
    please help if anybody know...

    (I can use only date,ls,cut,awk,sed).
    Pretty restrictive bash script  If that's the only commands you can use.  What's putting on these restrictions?
    Does it have to be a bash script?  Or are you just want something to produce those results?  Because the system's find (command+f) or utilities like Find any File can do this.  Just look for a mod date within a range.
    For bash do a google search for something like "os x bash to get mod date" for script suggestions.

  • Executing a bash command from Java

    I want to execute a bash command from within a Java application on the server. I know how to do simple commands, but this command is killing me. I get nothing back when I send it.
    p = Runtime.getRuntime().exec(new String[]{"ps","-ef","","grep","evolution"});
    There is also another part where I want the results piped to awk and fetch out the pids. BUt with this not working the rest is a waste for now.
    Robbie

    evgeni00 wrote:
    Thank you for assuming the posters' stupidity.I can only see the information that you provide. You didn't say you tried the recommendations.
    I read the article and I tried the things he/she is proposing, also the error stream, guess what it outputs: nothing.Maybe you did it wrong. If you didn't do it wrong, then that program you're invoking is poorly written, because it dies in error without producing any error messages.
    And I also searched for the exitValue 138, but didn't get much further than that its some system specific value. If you know where I can find more information, I would appreciate if you let me know about it. As jschell pointed out it's probably app specific. You can search the source code and/or documentation of that program to see if they say what 138 means.
    Apart from that -- it seems that environment and run directory issues can trip this up. Try checking that stuff out. Maybe your program expects something on the executable PATH that isn't there. Or maybe you're not running it in the working directory that you think you are.

  • How do I run a snmpwalk/any bash command as a Linux/Unix command (2 state monitor) on a Isilon storage device

    Is there a way that I can run a snmpwalk / isi devices (to find the status of the disk drives in islon) / any Linux bash command using a 2 state monitor Unix/Linux shell command and target a storage device (Isilon in my case) and not target a Unix/Linux
    machine. I tried creating one and it complained saying,
    Is there a way I could run a bash command in my isilon storage and use the ouput to determine the state of the monitor? Please let me know
    Hari V

    For Unix/Linux shell command in Operation Manager to monitor 2 state, you can refer to below link
    http://contoso.se/blog/?p=2680
    http://stefanroth.net/2012/10/21/scom-2012-linux-two-state-monitor-with-script-in-script/
    http://operatingquadrant.com/2012/02/01/opsmgr-2012-unixlinux-authoring-templates-more-information-on-the-shell-command-templates/#more-746
    Please remember, if you see a post that helped you please click (Vote As Helpful" and if it answered your question, please click (Mark As Answer).

  • Apple Wireless Keyboard lost connection when "command+space" is pressed

    Hi, my apple wireless keyboard lost connection when command and space key was pressed. it does not lost connection when other keys combination was pressed. Are there any people has the same problem with me?
    I am using Emacs all the time, the command and space key is the default short cut for Mark in Emacs. It is constantly used in my daily work. The wireless keyboard does not lost connection always, but it does lost connection sometimes. I have observed every time it lost connection, the command + space was pressed. Really strange. Any advice?
    I am using Macbook Pro 13inch Late 2012,  OSX 10.9.1, and Apple Wireless Keyboard

    Got the keyboard working again, here how incase it can help anyone else:
    I borrowed a USB keyboard to allow me to get past the pasword login.
    First I rang disk utitlity to repair any permissions. I opended up the app 'Bluetooth Setup Assistant' selected 'Keyboard' then I turned the keyboard 'on' so the green light is flashing' and then hit continue. At this point the keyboard appears in the listing of found items, hitting continue I am then given a unique pairing code. Enter this on the keyboard and hit 'Return' after a few seconds, the pairing is complete and by wireless keyboard is back and working again!

  • Sending Mail to Local Users via the Terminal mail Command

    I am having trouble sending mail to other user account via the terminal mail command. It seems to work with some accounts i.e. guest, etc, but fails with others i.e. Dennis. It will fail with no error message. Has anyone had any experience using the unix mail command locally ?
    Dennis

    I don't know the answer to this but you might try the -v option on the mail command in order to get verbose output. Perhaps a useful message would pop up.
    Also, you might consider posting this message in the Unix Forum. There is a good chance that someone there can help you with this issue.
    EMAC G4 1.0 GHz   Mac OS X (10.4.6)  

Maybe you are looking for

  • Button to see passwords stored in Firefox browser?

    Hallo, I often use the saved passwords of my Firefox browser to see and sometimes erase the passwords...only everytime I must go to Tools - Options - Safety - saved password. I was arguing if there is a way to insert a link in the toolbar to simplify

  • How i can check my phone is under warrenty???????

    i want to know, how i can check my phone warrenty period and my phone originallty...........

  • Constant request of permission in Controlled Account. Help please?

    Hi all, I have a problem with a Parental Controlled application in Lion. (Actually this problem has remained from Leopard, SL, and now Lion) Here it is. I set up an account for kids to use, and applications that are allowed from inside the Admin acco

  • I want to repair my water damaged Blackberry

    So I was having a great day at the beach and me and my blackberry went swimming. This happened over a week ago. I did the rice thing but it didn't matter my phone is broken. Is there any way I can figure out what is broken and buy a replacement part?

  • Error on iTunes 8.2.1. in iStore  (-42404)

    I recently lost my Spotlight and other apps, went to Discussions, tried various suggested things (repairing permissions, etc) and couldn't restore them, so had to resort to re-installing my OS X CD's and then upgrading to 10.4.11, and doing a lot of