View Single Post
Old February 12th, 2010, 09:03 AM   #2 (permalink)
darrin2520
Member
 
Join Date: Feb 2010
Posts: 116
 
Device(s): Droid
Carrier: Not Provided

Thanks: 16
Thanked 6 Times in 4 Posts
Default

I am a big time linux geek and I actually use the shell quite a bit. The Android Terminal Emulator works just fine for me. However, I did go through great pains last night to extract the shell from the Sholes rom as it is much much better if you are going to be using it much.

The shell that comes stock is a stripped down Bourne Shell. The Sholes Rom has a pretty nifty Bourne Again Shell (BASH), that adds more features, but most importantly nice colors and more info.

When you use the shell in linux for the most part you are not really using built in shell commands, but built in script files. These files reside in /system/bin for the Droid. You can do an 'ls' on that directory and see what is there.

A couple of things to help though:

"ls -l" - Gives a listing of the current directory with expanded information (doesn't work in the basic shell)
"du -csh" - gives a disk usage of each file/directory in the current branch.
"cat filename1 > filename2" - For some reason, the Droid does not come with a copy (cp) command. This works in the exact same way.

Let me know if there is anything in particular you are looking for. One thing that helps is understanding redirection and pipes.

'>' Means to put the output of the command into a file as specified. Overwrites the file.
'>>' Means to put the output of the command into a file, but does not overwrite the file, it places it at the end.
'|' - means pipe the output of one program into another program.
'<' - means to use the specified file for the input to the program.

If anyone wants to use the shell that came with the Sholes rom, I can post some instructions on how to do that. It really isn't worth it unless you plan on using the shell a lot.
darrin2520 is offline  
Reply With Quote
The Following 2 Users Say Thank You to darrin2520 For This Useful Post:
bookie (December 31st, 2010), hortstu (December 1st, 2010)