![]() |
feedback on Unix FAQ
This thread is intended for feedback on the "Unix FAQ" sticky thread that is listed at the top of the "UNIX - Newcomers" forum thread listing:
http://forums.macosxhints.com/showthread.php?t=40648 Please use this thread to suggest additions or corrections to the FAQ. |
Add: "What's an easy way to tell what shell I'm running?"
I'd write up an answer for this, but I don't know it. Which is why I wanna see it. :) Expand: "Why do I get "command not found" when I try to run a command?" If you're in the same directory as the command you're trying to run (for example, a script you just wrote) you'll need to add ./ before the command. Most shells don't include the current directory in the path for security reasons. So if you're trying to run a shell script named foo.sh you would enter ./foo.sh (feel free to use this text, or write it up more eloquently, whichever) |
It would be very valuable to explain about the differences between various types of shells. For instance: login shell vs non-login shells, interactive shells, etc.
Also, an explanation of the uses of these shell-related files would be nice. .login, .profile, .bashrc, .bash_profile, .bash_login Granted, one could search here and find information on this, but early on you sometimes don't know enough to understand the bits and pieces which you find in individual threads. |
Maybe an explanation of how and why to make/restore a .bak file when trying out some of the hints here when they affect some of the files like
.login, .profile, .bashrc, .bash_profile, .bash_login Also maybe an explanation on chmod and what all those numbers mean. like 777, 755, ...et. |
> How do I set up my shell execution PATH?
Some binaries installers which put files in /usr/local/bin also install man pages at /usr/local/man. There is no mention in the FAQ about how to access those man pages (since "man xxxx", xxxx being a command in /usr/local/bin will return "No manual entry for xxxx" even if /usr/local/bin is in the path). Should I add /usr/local/man to the path too in ~/.profile, or is there any other preferred place for that. |
Quote:
Try doing: echo $MANPATH and then I think you will understand what you need to do. |
Quote:
Quote:
|
perhaps also some basic navigation tips would help
i.e. relative vs absolute paths, changing dirs ../../../where/I/Want\ to\ go/, basic vi nagivation (I think up, down, left, right, insert, replace, delete line, new line, save, and exit with/without saving would be enough) |
Quote:
|
Quote:
|
Quote:
It is difficult to figure out which one is associated with the Terminal that you are looking at. But I have now supplied an answer to this question in the FAQ - so go and look and see if it is sufficient. |
Give me, give me, give me...
Quote:
/usr/share/misc/man.conf and you'll see (about 2/3rds of the way through) that there's a hard-coded set of mappings of paths to associated manpath entries. So, for example, /usr/local/bin maps to /usr/local/share/man, rather than the thing you might guess (/usr/local/man). Cheers, Paul |
It's so uncommon that I'm looking solely for my processes with ps... I entered the command twice as ps -ax
And every time I used to type in solely ps I'd be irritated, because that wasn't ever what I was looking for. *sigh* I wonder how many other things I haven't noticed in life because I was looking for something else... |
Quote:
|
Quote:
|
Quote:
|
hayne,
You may also want to add in setting PATH, in the note about fink, that 'init.sh' will also add /usr/X11R6/bin and /usr/X11R6/man to your PATH so you can use X11 when it is installed. . |
Quote:
ps aux It is also pretty handy to have an alias (I use psg) to look out for a specific process: ps aux | grep -v grep | grep Then you add the name of the process you're looking for after the last grep. |
Quote:
|
Another thing that should go in, especially since it a recommended step mentionned in the new WebKit instructions for Safari is how to add directories in the shell path since its something that could be very practical for new unix users (less typing is always better :) )
|
Quote:
|
I guess it is implicitly indicated yes.
|
Ok ok... Shame on me for the last post... I looked at post 2 in this thread instead of the Unix FAQ one... Yeah your right... Its very nicely put in that proper thread :rolleyes:
|
Quote:
Now if I could get the chsh command to work, I'd actually be able to change to a useful shell. (Which is a whole long thread in itself, and not really important) |
Thanks for the suggestions for the FAQ.
I have now added in sections that respond (at least partially) to all of the suggestions to this point. Don't hesitate to point out errors or parts that are unclear. |
unix vs gui
Quote:
Thank you for your work. |
Quote:
open ~/monza/ps-files But thanks for the reminder - I forgot about the 'open' command when I was making that list of commonly used commands. I'll go add it now. |
Hi Hayne, I noticed in the Faq
How can I redirect the output from a command into a file? you mention Quote:
Also in a reply to one of my posts, you reminded me of a useful command option for searching the Man pages. man -k foo which maybe handy for others to know. Thanks |
Quote:
|
Adapt old questions/include a new one about using Standard accounts.
Several questions are very nicely addressed, but assume that the user is operating from an Administrator's account. For example, the use of 'sudo' in:
---------- 7) What's the deal with permissions? How do I change them? and 8) How do I gain "root" privileges? Do I need to enable the "root" user? ---------- This is no doubt a good assumption, given that people are operating from the command line, but now that recommendations are to operate from a Standard account, the beginner might run into a roadblock with these. You probably know the best way to approach this, but possibilities would be: (1) to say to make sure you're operating from an administrator's account before doing this; or (2) to tell how to 'su adminusername' to get administrator's command line privileges temporarily. or (3) there is something else I don't know about. Granted, (3) is guaranteed to be true as a general idea, but I meant that there is another way of operating from a Standard account with all its benefits, and still using 'sudo' from the command line. Thanks for this wonderful resource. |
Quote:
I'll try to add some explanation along the lines you suggested. Thanks. |
Re: How can I tell what shell I am running?
How about using Code:
finger `whoami`Code:
finger $USER |
Quote:
But I added your suggestion of using 'finger' as an alternative way of seeing what shell is assigned to your account. Note, however, that some corporate installations will have disabled 'finger' on their Macs. |
| All times are GMT -5. The time now is 10:20 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.