SD Card free space (Storage Space or Disk Space) remaining

已查看 376 次
跳至第一个未读帖子

CyberPine Educational Media

未读,
2012年8月20日 16:55:362012/8/20
收件人 tas...@googlegroups.com
Any way to get SD Free Space remaining in Tasker?

Matt R

未读,
2012年8月20日 18:19:072012/8/20
收件人 tas...@googlegroups.com
Best way I know is run a shell script (Run Script -> Shell) with the command "df /SDcardPathHere".  For me, this would be "df /mnt/sdcard-ext" (no quotes).  Have the output returned to a variable of your choosing and then parse the results to get the number you want.
 
Matt

RudeboyX

未读,
2012年9月4日 11:00:402012/9/4
收件人 tas...@googlegroups.com

JY

未读,
2014年5月16日 13:27:192014/5/16
收件人 tas...@googlegroups.com
Use stat to get free space:
stat -ft /target/mountpoint
Column 5 is your blocksize, 7 is your free blocks. Multiply blocksize by free blocks to get free space in bytes.

Or if you're lazy...
stat -ft | cut -d' ' -f 7
Shove output into a variable, then multiply variable by 4096 (or whatever your blocksize is).

Steve Rothkin

未读,
2016年6月22日 07:23:502016/6/22
收件人 Tasker
This stopped working with the latest busybox update because now the stat command doesn't support -t. Instead it has a -c to specify formatting. %B is block size and %c is free blocks.

How do I pass % to the shell command? Tasker is trying to interpret the %c and %B as variables. I tried %%c but that didn't help.

Prokrypt

未读,
2016年6月23日 20:22:162016/6/23
收件人 tas...@googlegroups.com
Passing just %c and %B to the shell works for me. How do you know tasker is trying to interpret it?


--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/7ZEYjgJk06Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.

For more options, visit https://groups.google.com/d/optout.

Steve Rothkin

未读,
2016年6月23日 21:38:012016/6/23
收件人 tas...@googlegroups.com

Because tasker displays an error when I try to run the task and doesn't actually execute it.

--
Steve Rothkin (914)762-4566 Check out my professional profile and connect with me on LinkedIn: http://www.linkedin.com/in/stevenrothkin/
回复全部
回复作者
转发
0 个新帖子