I'm trying to keep my log file growth in check on my triumph.
I have a text file I can paste into Terminal Emulator that will delete log files in /data; I want to be able to load this file from terminal emulator. I can get it to load, but it seems lost; (e.g., can't mount, can't change directories...) Can some one tell me how to load a file into terminal emulator that will run like when I paste the same commands into it? Basically, I'm trying to load a text file with these commands;
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblk8 /data
cd /data
rm alog_events
rm alog.?
rm plog.log.?
rm pmlog.log.?
rm alog_radio.?
rm alog_system.?
exit
.......
Note:
I was able to run the a script with SManager and it worked (I'd still like to know how to do it from the terminal).
This is a YouTube link to the video; http://youtu.be/jmAGTiRdYl8
1) Open Script Manager
2) List Script
3) Edit Mode (so you can see the commands)
4) Execute (Run) the file
The 'ls' at the end of the script shows a directory listing with only the base log file names left and of course 'event_logs' is gone.
#!/system/bin/sh
cd /data
ls -l alog*
ls -l p*.log
rm alog_events
rm alog.?
rm plog.log.?
rm pmlog.log.?
rm alog_radio.?
rm alog_system.?
ls alog*
ls p*.log
exit
I have a text file I can paste into Terminal Emulator that will delete log files in /data; I want to be able to load this file from terminal emulator. I can get it to load, but it seems lost; (e.g., can't mount, can't change directories...) Can some one tell me how to load a file into terminal emulator that will run like when I paste the same commands into it? Basically, I'm trying to load a text file with these commands;
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblk8 /data
cd /data
rm alog_events
rm alog.?
rm plog.log.?
rm pmlog.log.?
rm alog_radio.?
rm alog_system.?
exit
.......
Note:
I was able to run the a script with SManager and it worked (I'd still like to know how to do it from the terminal).
This is a YouTube link to the video; http://youtu.be/jmAGTiRdYl8
1) Open Script Manager
2) List Script
3) Edit Mode (so you can see the commands)
4) Execute (Run) the file
The 'ls' at the end of the script shows a directory listing with only the base log file names left and of course 'event_logs' is gone.
#!/system/bin/sh
cd /data
ls -l alog*
ls -l p*.log
rm alog_events
rm alog.?
rm plog.log.?
rm pmlog.log.?
rm alog_radio.?
rm alog_system.?
ls alog*
ls p*.log
exit