• February 25, 2025, 10:36:56 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: find does not support printf option  (Read 5109 times)

modr

  • Level 1 Member
  • *
  • Posts: 3
find does not support printf option
« on: October 30, 2012, 03:03:55 PM »


Hi Folks,

I'm looking forward to establish event triggered cloud like duplex file syncronisation. Therefore, I'd like to understand what the time stamp of the latest modified file is like that:

find . -type f -printf "%C@ %s %p\n" | sort -r | head -n 1

But, the OS of the DNS-320 does not recognise the printf option and comes up with

Code: [Select]
root@DNS-320:/mnt/HD/HD_a2# find . -type f -printf "%C@\n" | sort -r | head -n 1
find: unrecognized: -printf
BusyBox v1.12.1 (2008-09-29 20:38:04 CEST) multi-call binary

Usage: find [PATH...] [EXPRESSION]

Search for files. The default PATH is the current directory,
default EXPRESSION is '-print'

EXPRESSION may consist of:
-follow Dereference symlinks
        ....

Can anyone tell me how to get the OS bash/find ot recognise printf?

Thanks

re

Peter
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: find does not support printf option
« Reply #1 on: October 30, 2012, 06:03:54 PM »

It would appear you're not using the latest FFP (Fonz Fun-plug) as version 0.7 do not use commands from busybox. The find command is compiled from GNU findutils 4.4.2 source.
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]

modr

  • Level 1 Member
  • *
  • Posts: 3
Re: find does not support printf option
« Reply #2 on: October 31, 2012, 01:30:12 AM »


Thanks albert for your prompt reply!

How do I make sure what version for fuplug I've got installed? Is there a command to verify? I was always of the opinion to have v0.7 installed.

Would 0.7 support/comprise a more complete pack of GNU findutils, or would I need to istall it in any case?

Thanks a lot in advance

Re

Peter
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: find does not support printf option
« Reply #3 on: October 31, 2012, 01:53:18 AM »

Use cat /ffp/etc/ffp-version to verify FFP version.

Yes, FFP-0.7 has complete tools based on GNU source, in the case of find command it's a standalone program not a sym-link to busybox applets.
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]

modr

  • Level 1 Member
  • *
  • Posts: 3
Re: find does not support printf option
« Reply #4 on: October 31, 2012, 10:42:46 AM »


I wanted to update fun_plug to 0.7 ... and unfortunately did so and locked myself out as ssh is now deactivated as well as telnet is. I wanted to set execute rights to /ffp/start/telnetd.sh, but there is no telnetd.sh (nor can I find it in any other location).

I already did a factory reset and a firmware update, but nothing did help.

Would it be sufficient to upload another telnetd.sh? Could someone provide me with a copy of it?

What else could I do to get telnet access again?

Thanks a lot in advance

Re

Peter
Logged

albert

  • Level 5 Member
  • *****
  • Posts: 510
    • SoHo NAS Forum
Re: find does not support printf option
« Reply #5 on: October 31, 2012, 05:31:22 PM »

You should have kept the old FFP version by simply renaming the folder to something else before installing the latest FFP. The easiest solution is to redo the install process again, ie. copy the 2 files into Volume_1 and start afresh.

Do take note that there are 3 different FFP built for different processor, choose arm.


Note: delete or rename existing /ffp folder before performing FFP upgrade, use samba if you have no shell access.
Logged
D-Link DNS-320 rev A1 (FW: 2.05) [FFP-0.7]
PCI NAS-01G (FW: Encore ENNHD-1000 4.10)
PCI NAS-01G (FW: OpenNAS 1.9]