Unix/Linux Go Back    


Android Brand new forum for folks interesting in Linux and Java-based Android OS and multi-platform mobile computing in general.

Basic commands for android!!

Android


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 08-29-2013
shekhar_4_u shekhar_4_u is offline
Registered User
 
Join Date: Sep 2011
Last Activity: 11 May 2016, 4:45 AM EDT
Location: INDIA (delhi)
Posts: 57
Thanks: 34
Thanked 2 Times in 2 Posts
Basic commands for android!!

Hi,

I have a n android phone and just rooted it. I access it using 'terminal Emulator'. I performed many basic linux-like commands in the terminal like rm,ls,df,reboot etc and they are working fine. But many of them are not like man <something>, clear,du etc.

Can any of you please help to tell me alternatives for 'clear' and 'man' for android?Linux
Sponsored Links
    #2  
Old Unix and Linux 08-29-2013
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 22 June 2017, 3:16 PM EDT
Location: Loughborough
Posts: 1,210
Thanks: 364
Thanked 322 Times in 252 Posts
Hi...

I have just installed CygWin for the first time on my old Windwoes box and that didn't have clear either, so I quickly hacked this simple shell script and saved it in /usr/bin as clear...

Code:
#!/bin/bash --posix
# 'clear' command.
for n in {0..127}
do
        printf "\n"
done
printf "\x1B[1;1f"

Hopefully it will work for you with your version of shell. If not just experiment...
Don't forget to set the permissions as 755 or something similar and just launch it as the clear command...

Hope this is useful...
Sponsored Links
    #3  
Old Unix and Linux 08-29-2013
alister alister is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 11 June 2014, 8:40 PM EDT
Posts: 3,231
Thanks: 179
Thanked 976 Times in 790 Posts
Quote:
Originally Posted by wisecracker View Post
I have just installed CygWin for the first time on my old Windwoes box and that didn't have clear either ...
You can probably just type Control-L.

Regards,
Alister
    #4  
Old Unix and Linux 08-29-2013
RudiC RudiC is online now Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 27 June 2017, 1:15 PM EDT
Location: Aachen, Germany
Posts: 10,960
Thanks: 280
Thanked 3,370 Times in 3,103 Posts
What about
Code:
printf "\033[2J"

(man console_codes)
Sponsored Links
    #5  
Old Unix and Linux 08-29-2013
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 22 June 2017, 3:16 PM EDT
Location: Loughborough
Posts: 1,210
Thanks: 364
Thanked 322 Times in 252 Posts
Hi RudiC...

Sadly that does not work on this Apple OSX 10.7.5...

It does NOT reset the cursor back to the top left hand side (plus prompt)...

EDIT:

This is a better bet:-

Code:
printf "\x1B[2J\x1B[1;1f"

Sponsored Links
    #6  
Old Unix and Linux 08-29-2013
Neo's Unix or Linux Image
Neo Neo is offline Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 27 June 2017, 10:04 AM EDT
Location: Asia pacific region
Posts: 13,581
Thanks: 850
Thanked 1,139 Times in 533 Posts
Android phones do not have "man pages" per se included with the Android distribution on a mobile phone ....
Sponsored Links
    #7  
Old Unix and Linux 08-30-2013
shekhar_4_u shekhar_4_u is offline
Registered User
 
Join Date: Sep 2011
Last Activity: 11 May 2016, 4:45 AM EDT
Location: INDIA (delhi)
Posts: 57
Thanks: 34
Thanked 2 Times in 2 Posts
Thanks everyone for replying!!!


I am not able to even use 'vi', how do I now create file and save in /usr/bin. My phone is Xperia neo v mt 15i. Linux

echo is working. Print & printf are not working.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Noob scripting question with android ADB commands Onyoursix UNIX for Dummies Questions & Answers 2 10-21-2011 12:02 AM
Example Linux Commands on Android Neo Android 0 09-27-2010 02:04 PM
Need help in sftp basic commands livetaurean19 Shell Programming and Scripting 2 06-15-2005 08:41 AM
basic commands documentation kdgorton UNIX for Dummies Questions & Answers 1 02-20-2005 03:19 AM
Unix basic commands Peter Spellman UNIX for Dummies Questions & Answers 3 08-10-2001 07:41 PM



All times are GMT -4. The time now is 01:23 PM.