Monday, July 28, 2014

Android Terminal Commands

chmod    - give/take rights away from files.The numbers you see in the how-to's is a little
                complicated.It has to do with the rights you are assigning the file or folder.

cat         -  look at,modify or combine a file.You can also copy files with this command by
                "reading" it to another file insted of to the screen.

cd          -  change from one directory to another

cp          -  Copy a file from one location to another

dd         -  copies exact locations to other locations.Can be an entire drive,a folder, etc,
                dd if= of=,uses an input file and an output file.

df          -  how much free disk space.In Linux you can add a switch "df -h" but the "-h"
                does nothing for me on Android.

du         - show disk usage of files.Add "-h" to get human readable.Especially useful when
               you add "-d1" to limit the directory depth to 1.If you run "du -h -d1".it will tell
               you how much space each directory occupies,including their contents summed.

exit       -  exits the shell you are in.When you type su you start up a shell.

grep     -  search within a file for a text string.Also useful for parsing command output.
              'ls | grep something' is a quick way to list files that contain the string "something"

ifconfig -  get network interface configuration.Good for getting your own IP address.

kill       -  kill a process by PID

ls         - lists all files with in a directory.

mv       - Move a file from one location to another. At the same time you can rename a file.

ping     - see if an internet host is alive

pm       - android package manager. LOTS of useful things in here. type pm by itself for the
              help screen

ps        - list processes.Useful to see what is running

reboot  - one of the simplest commands.reboots your device

reboot recovery - reboots you into recovery console

reboot bootloader - Le Pan II specific,reboots you into fastboot mode

reboot download mode - download mode for samsung device

rm       -  followed by a file name with delete the file

rmdir   -  remove a directory, rm cant do it unless you remove recursively with  -R

su       - Substitue  User. We type this to switch to the root user. You need to type this
             command first to do a lot of the other commands.

sync    - synchronizes any data on disk with data in memory. We type this before rebooting
            to ensure we've got all data written.

tar      -  creates taped archives.Compresses files like winzip,7zip,winrar and other tar /?
             for details.

top     - like task manager.it displays running processes.in Linux the q key quits.On Android
            I dont know how to make it quit other than closing the app.

uptime - displays how long it has been since you last rebooted the system.


No comments:

Post a Comment