Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to can I view a simple text file via adb shell?

Tags:

android

How can I view a simple text file via adb or adb shell ? I know there is fileExplorer that comes with ADT but its not very handy, I have pull a file every time, then open it,

is there a quick way on the command line ?

like image 414
Ahmed Avatar asked Nov 17 '12 02:11

Ahmed


2 Answers

adb shell cat /sdcard/file.txt

cat is the command for displaying text files in linux.

usage: cat [-beflnstv] [-] [file ...]

like image 178
PC. Avatar answered Sep 19 '22 18:09

PC.


cat is the command which is useful to open text files in adb.

cat txtfile

or

cat txtfile.text
like image 29
AndroidOptimist Avatar answered Sep 19 '22 18:09

AndroidOptimist