Unix/OS geeks... how do you do a CD in the terminal?

I’m using mobile terminal on my phone to try and unzip a file. I know the location of the folder, but can’t figure out how to navigate to it. :banghead:

localhost:~ mobile$ (tried the following) dir (which lists the sub folders… one of which is where said file is located)
Tried the following

cd /libray
cd library
cd library/

each tell me “no such directory or filename”, but when I run a DIR it lists the folder

wtf? I miss DOS

that is correct

also, try ls to list contents and pwd for present working directory

edit: example time

tm93@DHTSH-L3WBNVE:~/Documents$ cd
tm93@DHTSH-L3WBNVE:~$ cd Music/
tm93@DHTSH-L3WBNVE:~/Music$ ls
tm93@DHTSH-L3WBNVE:~/Music$ ls -al
total 16
drwxr-xr-x 2 tm93 tm93 4096 2008-06-11 15:41 .
drwxr-xr-x 104 tm93 tm93 12288 2009-01-16 11:01 …
tm93@DHTSH-L3WBNVE:~/Music$ pwd
/home/tm93/Music
tm93@DHTSH-L3WBNVE:~/Music$

what syntax do I use it in?

thanks man :beer:

:lol:

ok, tried that and didn’t get anywhere. here is a snapshot

http://nyspeed.com/forums/attachment.php?attachmentid=7582&stc=1&d=1232136133

God I hate this filesystem/interface :stuck_out_tongue:

edit: trying to navigate to var/mobile (current)/library/downloads/

Capital L

Unix is case sensitive

awesome, thanks LZ… I wasn’t aware of that

works like a charm :beer:

thanks again guys

if you looked at my example, you would know it is case sensitive

edit:

Also, cd /Library is going to take you to the root of the filesystem, then into Library. cd Library will take you to the Library folder that exists within the directory you are currently in.

cd / - Takes you to the root of the filesystem
cd /Library - Takes you to the root, then into Library
cd Library - Takes you into the Library folder located within your current folder

understand?

didn’t even cross my mind, honestly… after using DOS systems for so long, it becomes second nature ignoring upper/lowercase :smiley:

it makes perfect sense now though lol

And putting a / before the folder name is a completely different path

werd, Dr. Stevil, check out my edit. Post here if you have any other questions

really? heh… no shit. So you’d be directing it to jump to a completely different folder off of root (folder? or whatever you call it in unix) opposed to a sub folder?

edit: read your example, thanks for the heads up on that.

so other than a few minor rules, it seems pretty similar to DOS… are most of the commands the same? would you use “CD…” to go up a folder?

yes

going to / or “the root”, is sort of like going to “C:”

awesome :tup: now I got a dumb question for you… how do you know which folder belongs to which partition?

The iphone has 2 partitions… one for important filesystem stuff, and another for the mobile device (installed apps/music/other crap), but I know it’s listed as a folder, not as, for example d:\ on a DOS system

df would work, I think.

It shows you what the different mount points are and what folders are mounted there. Drives are not identified by letters on a unix box though.

yep, check it out:

boardjnky4$ df
Filesystem 512-blocks Used Available Capacity Mounted on
/dev/disk0s1 312581744 297782784 14286960 96% /
devfs 206 206 0 100% /dev
fdesc 2 2 0 100% /dev
map -hosts 0 0 0 100% /net
map auto_home 0 0 0 100% /home

That box is all 1 partition, the entire filesystem is on disk0s1. If I were to put /home on its own partition, it would have another line with /home probably with something like disk0s2 or disk1s1.

works perfect :tup: thanks man