Terminal Startup Commands

So I was reading online about how to make Terminal run a command on startup. When entering the commands to make it run a command on the start of Terminal I guess I messed up, now whenever I start Terminal it says [Process Completed] and wont let me enter any more commands. It also does this when I open a new shell. I want to know if there is a way to delete this startup command so Terminal opens as it does out of the box.

Or this shell script->
#!/bin/sh
#showallfiles
# Description and usage message
usage () {
echo "
Description:
A simple shell script to reveal/conceal files
hidden in Mac OS X Finder application.
showallfiles excepts one option.
Usage: ${0##*/} [-h|--help] to show this help
${0##*/} [on|ON] to show hidden files
${0##*/} [off|OFF] to set the default hidden files
Example: ${0##*/} on
# Test for more than one option
if [ $# -gt 1 ]
then echo "${0##*/} -h to access help"; exit
fi
# Get the AppleShowAllFiles status in the domain com.apple.finder.plist or create the default off setting
STATUS=`defaults read com.apple.finder AppleShowAllFiles 2>/dev/null` || STATUS=`defaults write com.apple.finder AppleShowAllFiles OFF`
# Function to check AppleShowAllFiles status and change the status if necessary
finderfilesstatus () {
if [ "$STATUS" = "$SAF_OPT" ]
then
echo "AppleShowAllFiles is set to $SAF_OPT"
else
defaults write com.apple.finder AppleShowAllFiles $SAF_OPT
osascript -e 'tell application "Finder" to quit' -e 'delay 1' -e 'tell application "Finder" to launch'
fi
# Parse the command option
case "$1" in
'-h'|'--help') usage; exit;;
'on'|'ON') SAF_OPT="ON"; finderfilesstatus;;
'off'|'OFF') SAF_OPT="OFF"; finderfilesstatus;;
*) echo "${0##*/} -h to access help"; exit;;
esac

Similar Messages

  • Startup command not picking correct pfile

    Hi Guys,
    I am facing a problem. Whenever I try to start oracle on my Linux machine I get the foillowing error:
    ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/home/oracle/oracle/product/10.2.0/db_1/dbs/initARIES.ora'
    Actually the pfile mentioned is not the correct one. I do not know where it is taking the path from. I had to start using the following command:
    startup pfile=/home/oracle/oracle/product/10.2.0/db_1/admin/aries/pfile/init.ora.110200612140
    Please provide me some way that I need not to mention the full path of pfile everytime.
    Thanks

    You can also create the initARIES.ora file in the dbs directory (the database is searching there by default) and use the IFILE parameter to point to the file you actually want to use.
    It seems the file you currently using is the one created during installation. Doesn't you have an SPFILE??? Using an SPFILE has some advantages (faster startup, change parameter using alter statement). You can create one via create SPFILE xxx from PFILE. If you place it in the dbs directory oracle should find it automatically. Again no need to pfile in the startup command.

  • Srvctl vs startup command in RAC

    Hi,
    pls clarify some doubts about srvctl /startup?
    1,What is the difference between startup and srvctl in rac.what is the advantage of srvctl over startup.
    2,How to start the database( From CRS to DB instance) in rac by traditional method ( startup command).
    3,I read the oracledocumentation "http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/srvctladmin.htm"
    which says only command descriptions.but i need what actually happening while executing the command?
    4,The executions are same compare with traditional method or not?
    Thanks & Regards,

    Hi,
    1,What is the difference between startup and srvctl in rac.what is the advantage of srvctl over startup.
    - SRVCTL is cluster aware so you can control database instances for any node in the cluster, which is something you can not do manually. Consider policy based cluster databases in 11gR2, managing databases manually will not be easy.
    2,How to start the database( From CRS to DB instance) in rac by traditional method ( startup command).
    - Can you elaborate on your question? If your question is to start database manually then its exactly same as of single instance database OR do you want to start the database using cluster control utility (CRSCTL)?
    3,I read the oracledocumentation "http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/srvctladmin.htm"
    which says only command descriptions.but i need what actually happening while executing the command?
    - SRVCTL pass on request to Oracle Cluster ware, which checks for the dependencies and start the corresponding database resources. I guess internally it use the same OCI calls that SQL*Plus use to start the database.
    4,The executions are same compare with traditional method or not?
    - With SRVCTL, it checks for the dependencies such as asm and listener resources and start them where as manual method will fail startup and throw some relevant errors.
    Thanks & Regards,
    http://oraxperts.com.au

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

  • Startup command starts database but alter database open read only gives error

    Hi,
    I'm having some strange behavior. I've 10.2.0.3 database on windows 2003.
    The startup command starts database without any issues.
    But if I try following it gives error.
    startup mount (successful no errors)
    alter database open read only; gives error that file Mnnnnnn is missing.
    Why this is happening and how to fix it?
    Thanks.

    You really need to show us exactly what Oracle is telling you, using copy and paste, so we can have some clue.  You can hide details like instance and host names if they show up.
    I'm wondering if you had some messed up offline datafile in a tablespace, where Oracle handles it with startup, but gets upset when you try to open read-only.  It's some bizarro sequence of events like: add a datafile to a tablespace, decide that was a mistake, alter it offline, then remove it from the OS without telling Oracle any more about it.  I've come back from vacation to find scenarios like this, it winds up being a time-bomb trying to recreate a standby later.  Or something like that, I could be unremembering some details.

  • My Mac mini won't respond to startup commands

    Hi, first of all I'd like to say that I tried to find a solution not only in this forum but all over google could offer me and still no success in finding a solution to this problem I'm having, so you guys are my last hope before taking my computer to maintenance.
    Well, the thing is, I have a Mac mini Intel Core Duo 1.66GHz that, while trying to install Windows XP through bootcamp I accidentally deleted the Mac OS X disk partition, no harm there as I have a time machine backup, but now I'm trying to boot my OS X 10.6 disk to reinstall the OS but only Windows XP is starting up. I tried to startup with the keys option pressed but no menu to select the source it should boot. I also tried start it up with C pressed, I could hear the DVD spinning and the laser doing its job but only Windows XP boot up.
    During my journey trying to make my OS X disk to boot, I realize that almost no startup command was working as its suppose to be, I tried to ZAP PRAM using CMDOPT+PR but no double chime, tried then CMDOPT+NV to clear NV RAM and nothing. My keyboard is the original Apple aluminum wired keyboard that came with my iMac and it's working perfectly.
    I also tried to reset PMU, SMC and still no success.
    Message was edited by: Carlos Grossi

    Found out what's going on on this very same forum, during my research I actually wasn't using the right words on the search box to find what I need, but who'd know that the official Apple keyboard was the source of the problem, anyway for those who came here with the same problem as mine, turns out that my iMac Aluminum Keyboard isn't "compatible" with startup commands although it works for pretty much everything else, I just used an old PC USB keyboard to give the boot options using Alt as the Option key and Windows Logo as Command key.
    And that's it!

  • Adding SAP CCMS startup command to SAP Start Profile

    Hi All,
    We need to add SAP CCMS startup command in our SAP start profile.
    We use command sapccm4x -DCCMS pf=<> to start SAP CCMS agent .
    I expect we need to add this command (sapccm4x -DCCMS pf=<> ) with same protocol to execute it with SAP start profile.
    Please let me know how can we add this with SAP start profile.
    Shivam Mittal

    Hi Eric,
    I have added command and CCMS agent is also getting start with SAP startup.
    But when I execute command startsap ....like it shows message "database started";;"Instance Started", I am not getting any SAPCCMS agent startup message.
    Please suggest how can I get in startsap script SAPCCMS startup confirmation messge also. Does it require change in startsap script or we should some command protocol in startup profie for it.
    Please suggest.
    Shivam Mittal

  • Terminal touch command missing

    Terminal doesn't have /usr/bin/touch. /usr/bin is in my path but touch isn't there.
    $find / -name touch  returns nothing
    Is there anyway to download or reinstall it?

    Stan Sanderson wrote:
    Opening Terminal.app (login) results in "Macintosh:~MyUserName$" only. No history, etc.
    Welcome to Apple Discussions.
    That's normal. You can edit the various shell profiles and logins in your home directory.
    The file .bash_history is in your home directory, as is the .sh_history and such.
    The Terminal Startup pref is set to default login shell (/usr/bin/login). I'm using Bash.
    The default login is changed in the terminal preferences->Startup
    Also, the login process appears to be choking, then defaulting, based on the length of time for the initial prompt to appear (about 4 seconds) which feels excessive. It has been this way for some time now, so I can't attach it to any particular action.
    Run the console to see why it takes so long. Mine opens nearly instantly. I keep an alias in the dock.
    I've searched the forums and googled the problem, but haven't found anything that helps. It seems as if the answer should be simple, but it has stumped me.
    You did not search here:
    http://discussions.apple.com/forum.jspa?forumID=735
    which is where all these questions and more are answered and other Unix topics discussed.

  • List of Keyboard Startup commands?

    Hello,
    Is there a list of the different Startup commands anywhere? I can't seem to find any with various searches on the mac.com support sites.
    I've learned that holding "shift" at Startup will turn all extensions off. Is there a command for turning all extensions ON at Startup, regardless if some were disabled during an earlier brain-freeze moment?
    Thanks so much!
    Patterson
    Power Mac G4 Quicksilver 867   Mac OS 9.2.x   17" Studio Display, 512MB RAM

    Hi, Patterson -
    Is there a command for turning all extensions ON at Startup, regardless if some were disabled during an earlier brain-freeze moment?
    Not directly. However, if you hold down the Spacebar from the beginning of startup, Extensions Manager will open just before extensions and control panels will start to load. You can make any adjustments to the choice of Selected Set or to the on-off status of individual extensions and control panels at that time, then resume startup.

  • Regarding Oracle Startup command

    Hello All,
    Whenever we execute the startup command in sqlplus ::
    SQL> startup
    ORACLE instance started.
    Total System Global Area 252776588 bytes
    Fixed Size 450700 bytes
    Variable Size 218103808 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    SQL>
    Please elaborate what Fixed Size and Variable size contains??
    I mean what components come under Fixed and Variable size?
    Thanks !!
    Regards,
    Avadhut

    Fixed portion
    The size of the fixed portion is constant for a release and a plattform of Oracle, that is, it cannot be changed through any means such as altering the initialization parameters
    Variable portion
    The variable portion is called variable because its size (measured in bytes) can be changed. The variable portion consists of:
    large pool (optional)
    Provides working space for rman (although rman will also work without large pool).
    Shared pool The shared pool is used for objects that are shared among all users. For example: table definitions, PL/SQL definitions, cursors and so on.
    reference:http://www.adp-gmbh.ch/ora/concepts/sga.html

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

  • Terminal Usage - Cannot remove startup command

    All, this problem has me really flustered and irritated.
    I got tired of always going to Terminal to launch my iReports application, so I decided to right-click on my startup.sh file, and chose "Always use Terminal" to execute. I mean, if I want to double-click on any shell (*.sh) file, just send it to Terminal.
    I must have done something else, that I wasn't aware, because now, every time I launch Terminal byb itself, it tries to execute the application.
    I don't have ~/.login, but I have looked in the following files for the command that is executed:
    ~/.profile
    /etc/profile
    /etc/csh.login
    /etc/csh.cshrc
    /etc/bashrc
    None, of which, has the command: /Applications/iReport/bin/startup.sh
    Can anyone give me any guidance or things to look at that I haven't thought of yet? It would be HUGE! I use Terminal ALOT, and it's starting to get very very irritating. I have no idea how I could have done this.
    Thanks so much!

    Found the problem. Apparently, the setting isn't listed in the Windows Settings preference of Terminal.
    However, I saved the Terminal session to a file called terminal.term
    I then opened up the file in an editor, and found this:
    <pre>
    <dict>
    <key>WindowSettings</key>
    <array>
    <dict>
    <key>AutoFocus</key>
    <string>YES</string>
    <key>Autowrap</key>
    <string>YES</string>
    <key>ExecutionString</key>
    <string>/Applications/iReport-3.0.0/bin/startup.sh; exit</string>
    </dict>
    </array>
    </dict>
    </pre>
    I have no idea why the Execution string does NOT show up in Windows Settings of Terminal Preferences. I manually put "/bin/bash" as my Execution, but apparently it does not update this key?
    Anyway, I've removed they string value of the key (made it blank), opened terminal using that file, and then set it as Default.

  • Command executing on Terminal startup

    whenever i open Terminal, something is causing it to run a command:
    /Applications/GravSim; exit
    which invariably runs the command and exits, making the only way for me to actually get into a shell to be using the "New Command" option under "File". I've seen other posts with similar problems, but theres seemed to be fixable by editing a .cshrc or .login file, neither of which I can find using "ls -a" in any directories I would think would be normal (although I am somewhat new to terminal). The only thing I can figure is happening is that Terminal is for some reason running the last successful opening of Terminal (the last thing that may have opened terminal before this may have been me double-click-opening the shell program /Applications/Gravsim.
    is there some file im missing or something i can edit that will just make terminal always open regularly? (and yes, i have tried editing my preferences to execute a specific command (/bin/zsh) upon opening a new terminal window)

    Jason Merritt1 wrote:
    okay... i don't seem to have that file... or at least not in /Library/Preferences, now what?
    Try ~/Library/Preferences
    You must have it in there

  • First Time "STARTUP" command

    I just installed 8i Enterprise successfully on a Sun Ultra 5 box with Solaris 8.
    After I log into the box as the "oracle" user, I issue the "sqlplus" command. It then asks me for user name, I type: "sys/oracle as sysdba" and it comes back with "connected to an idle instance".
    Finally, at the "SQL>" prompt, I type "STARTUP OPEN PFILE=$ORACLE_HOME/dbs/mypfile.ora" and it returns:
    ORA-24323 value not allowed
    ORA-03113 end-of-file on communication channel
    I have verified that I do have the correct pfile, for the Installer made it during installation.
    Please HELP!!!

    Hi fractals
    Before we go any further we need to find out which version of Java is causing the problem. In the Terminal program, type "java -version" (without the quotes) and observe the behaviour. Hopefully, you'll get the long delay you mentioned earlier, but it will eventually print out the java version. This should serve to identify exactly which Java version has the problem. If you don't get the long delay, or it hangs without ever printing out the version then you need to follow these steps. In Terminal type:
    cd /System/Library/Frameworks/JavaVM.framework/Versions/1.3/Commands
    ./java -version
    cd /System/Library/Frameworks/JavaVM.framework/Versions/1.4/Commands
    ./java -version
    cd /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands
    ./java -version
    (you can cut and paste these commands from here)
    With any luck this will identify the faulty Java version. Come back when you know which one it is.
    Bob

  • Terminal: "Completed Command"

    I went to use Terminal today and was confronted with an empty window with "Completed Command" as the title. I noticed this topic here from about a month ago, but it doesn't help me. This is what I have tried and none of them work:
    Removing com.apple.terminal.plist
    Logging out and back in again.
    Restarting completely.
    Opening a new Terminal session.
    The prefs are set to the default /usr/bin/login, but changing this to execute /bin/bash on startup also has no effect.
    Help. I feel a bit stuck without a way to the command line!

    Problem solved - I deleted the prefs file and then restarted and that did it!

Maybe you are looking for