1
vote
1answer
88 views

Canot remove symlinks: after reboot, symlinks re-appear

Using ssh from BusyBox, I cannot remove symlinks: after rebooting the device, symlinks re-appear. ls -la shows that symlinks have been removed, but after rebooting device they re-appear again. Those ...
3
votes
1answer
193 views

Rename files with spaces in a BusyBox shell

I'm trying to rename some files on my Synology Diskstation via SSH. The available shell is the BusyBox built-in shell: BusyBox v1.16.1 (2013-04-16 20:13:10 CST) built-in shell (ash) The move ...
1
vote
2answers
343 views

How can I make awk on Busybox treat the entire input with NULL character in between as a single record?

I wrote a base64 encode script for my Busybox system. #!/bin/sh base64encode() { /usr/bin/awk -- ' function asc(char,l_found) { l_found=0; for (i=0;i<=255;i++){ if ...
1
vote
2answers
1k views

Busy box Read file line by line

There is no read applet comming with busy box. Is there any way to read a txt file line by line using busybox? What I have now is while read line do echo $line done < "$InputFile"
3
votes
1answer
2k views

What are special prompt symbols for busybox's sh support?

I want to setup a time prompt on PS1. But, there is no document about what are symbols the busybox support. Is there any one know? Here are all which I knew. PS1='\u@\h: \w \$'
3
votes
1answer
534 views

Need to improve urlencode function

I need a way to URL encode strings with a shell script on a OpenWRT device running old version of busybox. Right now I ended up with the following code: urlencode() { echo "$@" | awk -v ORS="" '{ ...
1
vote
1answer
1k views

busybox ash PS1 not expanding

I am trying to setup busybox's ash on an embedded system to support expanding the PS1 prompt statement. I have it currently set as PS1='\u@\h:\w\$ ' However, all that is displayed is literally ...
2
votes
1answer
543 views

Chaining commands within `watch`

Ok, this is driving me a bit nuts. I'm trying to watch the number of files in a set of subdirectories. find . | wc -l correctly returns the number of sub-folders and files. However, watch 'find . | ...
1
vote
1answer
720 views

How do I safely unmount a network share on Linux STB without crashing (I get GSOD)?

I have a network share named dreambox on C:\dreambox that is shared with the group Everyone in Windows. I have mounted it to /hdd on a Linux-based STB with OpenDreambox (OpenEmbedded) using Telnet ...
2
votes
2answers
683 views

Remove 50GB oldest files in busybox when used capacity reaches 95%

Ok i have requested a code here but initial i didn't ask to make it busybox compatible. My bad. I'm new to linux and coding. The code needs to do the following: Delete 50GB of oldest data (dir ...
5
votes
1answer
1k views

Search for a string in files recursively in BusyBox 1.0? [duplicate]

Possible Duplicate: How to grep a text recursively on BusyBox 1.0? How can I search for a string in a file recursively in BusyBox 1.0 if find and grep are not available ? (I want to telnet ...
1
vote
1answer
248 views

Check a bash variable against a file

I have a bash variable ($HTTP_COOKIE) which contains a string. I want to check if this string matches the content of a given file (token). I'm working on a busybox linux. How should I do?
3
votes
2answers
3k views

Sorting by date

Original: Jan 23 2011 10:42 SOMETHING 2007.12.20.avi Jun 26 2009 SOMETHING 2009.06.25.avi Feb 12 2010 SOMETHING 2010.02.11.avi Jan 29 2011 09:17 SOMETHING 2011.01.27.avi Feb 11 2011 20:06 SOMETHING ...