![]() |
Stupidly easy question I can't answer
Hello,
as the title of this thread indicated I am having problems with a simple activity. I want to move around osx with unix and I can't figure out how to access files and directories with spaces in them E.G Moving to a directory called "the first" cd the first this doesn't work I have tried "cd the_first" this doesn't work what do I use to access folders/directories with spacing in the folder/directory name. I am sure I am being a complete goff ball... stefan |
figured it out....
cd the\ first thought it was stupidly easy i'm a complete muppet stefan |
Another just as easy solution:
cd "the first" -rob. |
or use auto complete ....
cd the[TAB] :c) Jack |
Quote:
Thinking about the method you have adopted is a more intuitive than the \. This off topic for this thread but how can i remove directories that are file laden? I am trying to remove a folder/directory that has ended up in a place it shouldn't be and I would like to delete. but using the rmdir then the directory name unix is telling me this "Directory not empty" thanks stefan |
Quote:
stefan |
Quote:
rm -r directoryname |
Quote:
rm -ir directoryname The "-i" means you have to confirm all deletions with a "y" or an "n", which if there are a lot of items can take some time, but it's a really good idea to do because if you accidentally delete the wrong directory, (like the root directory for example), you can abort the process by typing "n" for individual items or hitting control-c to stop it altogether. Trevor |
Quote:
This thread has gone massively off topic but I am learning a lot about UNIX and am quite enjoying it thank for all your input :) stefan |
You're right -- root the account and the root directory are different.
The root directory is the top of the directory tree. Look at it by issuing the command ls / The root account is the system 'owner' or superuser. Just to confuse things a bit more, that account has a home directory called /root (that is, it's immediately below the root of the filesystem). You should see it in the listing you just did of '/'. [Actually, that directory may not exist on your system if you haven't enabled the root account. If you don't see /root, try searching these forums for 'enable root account' or something like that. And as I think you've probably already seen, the warning is to always be very careful when you're using the root account.] Breen |
Quote:
Apart from that maybe you can give some advice about unix in general? I have been playing about with it for a while now and have only got a basic knowledge of the os thus far. But what I am wondering is what are the cement uses of unix? where does unix rock? as most of the thing I can do so far can easily be done with mouse & gui just a bit slowier. I am interested in unix as it was something that made me want to run away from the cl as soon as possible because i had no concept of how to use it, so making me want to understand it more :) |
where does unix rock?
where does unix rock?
I would suggest that you pick up some books and do a little bit of reading on your own. Some of the books that I would recommend are as follows: "Unix for MAC OS X" by Matisse Enzer or "Learning unix for MAC OS X Panther" found at "http://slashdot.org/article.pl?sid=04/02/19/1910207" or "Unix for MAC your visual blueprint to maximizing the foundation for Mac OS X" There are just two many things to point out in Unix where things rock! Some of my favorite unix commands however are 1. ) echo such as echo $SHELL 2.) cat such as cat *.txt 3.) redirect command such as date > list.txt There are really no GUI equivalent to these above command line. There are of course many more things that you can do with unix, but these are just a few. Please do a little bit of reading. Most of the answers to your questions are a bookstore or mouse click away. If you are not able to afford books, then the www has a lot of resources that you can take advantage of to learn more about unix. Here are some urls to get you started with unix help. Just put these in your favorite browser, and you will be in the world of unix and see how unix rocks and rolls. " http://forums.macosxhints.com/ http://discussions.info.apple.com/ http://www.well.com/index.html http://developer.apple.com/darwin/ http://www.wsanchez.net/papers/USENIX_2000/ http://www.gnu.org/software/bash/manual/bash.html http://www.kornshell.com/ http://zsh.sourceforge.net/ http://unix.about.com/library/course...pt-outline.htm http://steve-parker.org/sh/sh.shtml http://www.oreilly.com/catalog/bash2/ http://www.openssh.org/history.html http://www.jmarshall.com/easy/http/ http://www.oreilly.com/catalog/httppr/ http://www.fetchsoftworks.com/ http://www.rbrowser.com/ http://rsync.samba.org/ http://www.oreilly.com/catalog/tcsh/ http://www.openssh.org/ http://www.openssh.org/list.html http://sunsite.dk/vpnd/ http://www.bresink.de/osx/NFSManager.html http://www.sudo.ws/ http://www.metaobject.com/ http://homepage.mac.com/WebObjects/F...cty=US&lang=en http://www.macosxlabs.org/rsyncx/rsyncx.html http://www.pocketsw.com/PocketSoftware/index.php http://www.dantz.com/ http://www.orange-carb.org/SkeyCalc/ http://web.mit.edu/kerberos/www/ http://ettercap.sourceforge.net/forum/viewforum.php?f=8 http://ettercap.sourceforge.net/foru...asc&highlight= http://ettercap.sourceforge.net/forum/memberlist.php " thx RLC |
Quote:
In regard to doing some light reading i guess with respect you would need to do a lot more than just light reading to get to grips with the more advanced features of this command line beastie. Thanks for all the urls I will have to save this page so I can refer to them as and when they are needed. stefan |
Quote:
|
By the way...to change the password for your root account if you have forgotten it or to set a password for the first time...
|
Good Tutorial
Hi,
One of the places that helped me learn about the power of UNIX was at OSXFAQ http://www.osxfaq.com/Tutorials/LearningCenter/index.ws. I found that it took three or four tries (via different methods) to really get my head around the basics of file structure, shell, and commands. I am by no means an expert, but I feel much more comfortable with the CLI than I used to. A couple of things will help you get the right mindset: 1) UNIX was written by programmers for programmers. 2) It's cryptic and powerful. 3) It treats you like an adult and assumes that you know what you're doing. 4) From its foundations UNIX is a multi-user system. There's a lot more, but hopefully this will help get you started. Best Regards, John Haffner |
Quote:
Hey John :) thanks for the link its rather a good one I have visited it before and was very helpful haven't completed the bulk of them and your post have reminded me my work isn't quite done with this yet!! I am starting to get more use to the command line its something that I don't really have to use on a day to day basis but if I am going to continue with the web development at the rate I am its only a matter of time before I am going to need it. I ended up buying a copy of mac os x panther unleashed by sams which has lots of good stuff, I need to reset my unix under belly to get MySQL working which the book details I have tried this before and this is why my mac is a bit of a mess unix wise, need a clean sheet. thanks again. stefan |
Quote:
Code:
sudo passwd rootYou can also do this by booting from your Mac OS X install/upgrade disks. |
Using TAB to auto-complete -- that's my favorite solution
Quote:
I also tend to prefer copying and pasting over typing, regardless of the situation -- Like, if I need a file's name to be typed elsewhere, I often go to the file, pretend I'm going to rename it, and copy the name. That way, I can paste the name and it will be precisely correct -- I eliminate a source of error [namely, me]. |
Quote:
Second, if you want to get the filename, you can drag the file's icon into the Terminal window -- it will type it on the command line. And on an unrelated note (so I don't have to post twice): Quote:
|
I realized I all those things you pointed out about shell usage -- my point is that copying and pasting "eliminates" a source of error, not that I can't correct errors in Terminal. I'm well acquainted with history, too. If I copy a filename, I know I won't misspell it, and I won't need to use backspace or arrow keys. That tip is useful for all computer usage, not just for command-line and Terminal action.
Thanks, though -- and it never hurts to mention such things, since other readers will not have realized that you can, for example, drag a folder or file into Terminal to see its proper, complete path typed out for you. |
| All times are GMT -5. The time now is 10:36 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.