.tcshrc

Posted:
in macOS edited January 2014
Where is my .tcshrc under OS X?

Comments

  • Reply 1 of 14
    stimulistimuli Posts: 564member
    In your home directory.

    ls -al ~/

    will show all your files, in 'long' format.



    In fact, you might want to add:



    alias ls='ls -s -F -T 0 -b -H -1 -C --color=auto'

    alias fmake='./configure && make && sudo make install && echo "\t\t### Done! ###" '



    to your .tcshrc so you can compile w/ a simple 'fmake' on the commandline and 'ls' is more informative.



    edit: I'm not sure how to make these changes immediate on OSX other than rebooting. You can paste them into a term as well, and use the aliases immediatly.



    [ 07-23-2002: Message edited by: stimuli ]</p>
  • Reply 2 of 14
    serranoserrano Posts: 1,806member
    Thank you.







    However there is no .tcshrc, only .cshrc. What shell should I be using in order to use .tcshrc?



    [ 07-23-2002: Message edited by: serrano ]</p>
  • Reply 3 of 14
    stimulistimuli Posts: 564member
    Your welcome. Make sure you peep the edit in my above post.
  • Reply 4 of 14
    stimulistimuli Posts: 564member
    A Lucky guess is that that is the file you are looking for. Try it; if on reboot those aliases you added to it don't work, then you know it's not the rc file you are looking for. If that's the case, type:



    ln -s .cshrc .tcshrc



    And your problem should be fixed.



    However, 'csh' is Corn Shell (spelling?) and tcsh is a free implementation of the corn shell (if memory serves me correctly).



    edit: You can peep my .bashrc (similar) at <a href="http://www.stimuli.ca/linux/files/.bashrc"; target="_blank">http://www.stimuli.ca/linux/.bashrc</a>;



    [ 07-23-2002: Message edited by: stimuli ]</p>
  • Reply 5 of 14
    eugeneeugene Posts: 8,254member
    There's no file named .tcshrc by default.



    /etc/csh.cshrc references /usr/share/init/tcsh/rc which in turn points to several files in /usr/share/init/tcsh/



    If you wish to create a personalized .tcshrc, nothing is barring you from making that file in your home directory.



    You can also ape the format OS X uses and create files in ~/Library/init/tcsh...
  • Reply 6 of 14
    serranoserrano Posts: 1,806member
    Thank you both, I wanted to give it a restart but I'm in the middle of a rather large nmap scan; the logfile is oN, and thus resumable, but I'd rather let her finish.



    Very good information, thank you, I'll sort through it and post my results.



  • Reply 7 of 14
    stimulistimuli Posts: 564member
    Well, what the hell, just ln -s .cshrc .tcshrc and you'll know for sure you've got a viable rc file. No restart

    necessary really.



    Maybe Eugene knows some command to merge the new .tcshrc w/ whatever is in RAM?
  • Reply 8 of 14
    eugeneeugene Posts: 8,254member
    AFAIK, CSH stands for C-Shell because its scripting behavior is much liks C. tcsh stands for Turbo C-Shell. The Corn Shell is ksh.



    [quote]Maybe Eugene knows some command to merge the new .tcshrc w/ whatever is in RAM?<hr></blockquote>



    ?? Not sure what you mean...



    source path/to/.tcshrc



    ??
  • Reply 9 of 14
    bungebunge Posts: 7,329member
    I was trying to set up a .tcshrc file in my home directory so I could set the CLASSPATH for some java coding, only it didn't work (even after a reboot.) If someone could direct me to a decent tutorial or give me some info I'd appreciate it. I'm self-learning java but all the books I've found are windows-centric and don't touch OS X.



    They're simple books for a simple programmer.



    Anyway, I can't even run javac properly. At least what it compiles doesn't run at all.



    Cripes!



    Thanks.
  • Reply 10 of 14
    pyr3pyr3 Posts: 946member
    [quote]edit: I'm not sure how to make these changes immediate on OSX other than rebooting. You can paste them into a term as well, and use the aliases immediatly.<hr></blockquote>



    You should be able to have the settings apply by just closing the terminal window and opening another one. ( Or just opening another one, although the settings will not be applied in any terminals that you left open ). Or just by running the command tcsh from the command line. This works in linux/unix to my knowledge I assume that it should apply to OSX/Darwin as well.
  • Reply 11 of 14
    pentopento Posts: 1member
    [quote]Originally posted by bunge:

    <strong>I was trying to set up a .tcshrc file in my home directory so I could set the CLASSPATH for some java coding, only it didn't work (even after a reboot.) If someone could direct me to a decent tutorial or give me some info I'd appreciate it. I'm self-learning java but all the books I've found are windows-centric and don't touch OS X.



    They're simple books for a simple programmer.



    Anyway, I can't even run javac properly. At least what it compiles doesn't run at all.



    Cripes!



    Thanks.</strong><hr></blockquote>



    Shouldn't need any "CLASSPATH" but editing/creating your .tcshrc file is always good for customizing your shell to the way you like it(assuming you're running tcsh). If you have the latest developer tools installed and 10.1.x, javac and java should run perfectly fine(javac being the compiler to compile foo.java source files [note it MUST have the .java extension] and java being the command which executes your compiled java code). Good luck and have fun with the java!



    [ 07-23-2002: Message edited by: pento ]</p>
  • Reply 12 of 14
    [quote]Originally posted by bunge:

    <strong>I was trying to set up a .tcshrc file in my home directory so I could set the CLASSPATH for some java coding, only it didn't work (even after a reboot.) If someone could direct me to a decent tutorial or give me some info I'd appreciate it. I'm self-learning java but all the books I've found are windows-centric and don't touch OS X.

    </strong><hr></blockquote>



    Make sure you are using SETENV (EXPORT for ksh/sh/bash) to set the CLASSPATH environment variable. Then make sure you are sourceing the script that is setting it, not just running it: source &lt;scriptname&gt; or . &lt;scriptname&gt;, . does the same thing.
  • Reply 13 of 14
    serranoserrano Posts: 1,806member
    The answer to all our problems lies in /usr/share/init/tcsh/README.
  • Reply 14 of 14
    Read the man pages



    &gt;man csh

    &gt;man tcsh



    read read read





    RTFM
Sign In or Register to comment.