Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Unexpected directory listing

You can create a shell script or an alias that takes the path as an argument.
htmltiger

Unexpected directory listing

There is one issue when doing directory size
the normal command
ls -la "/etc/config"

but when changing it becomes
ls -la | sed -r 's/\b[0-9]{20}\b/123/g' "/etc/config"

and gives error as it should have been
ls -la "/etc/config" | sed -r 's/\b[0-9]{20}\b/123/g'

is there a placeholder which can be placed in the list command for eg %path%?
ls -la %path% | sed -r 's/\b[0-9]{20}\b/123/g'
martin

Re: Unexpected directory listing

If only SCP is available, your workaround is what I would recommend. Thanks for sharing it.
htmltiger

Unexpected directory listing

SFTP is not available in openwrt.
The current workaround in my case is change shell listing command from ls -la to:
ls -la | sed -r 's/\b[0-9]{20}\b/123/g'
martin

Re: Unexpected directory listing

Yes, that's likely over the limit. Why do you use SCP? Does SFTP work?
htmltiger

Unexpected directory listing

Hi,

I am using WinSCP for a long time and never had issues.
Currently on version 5.19.2,11614
This is an openwrt device and seem like the size length is 20 digits so may be is over the limit.
Unexpected directory listing line 'drwxr-xr-x 1 root root 18446744073709551504 Oct 4 13:00 config'.

/etc/config is a directory and the real size of it is very small.

Here is output of ls -la
root@openwrt:/etc# ls -al

drwxr-xr-x    1 root     root          2064 Sep 22 22:23 .
drwxr-xr-x    1 root     root           608 Feb 27  2021 ..
lrwxrwxrwx    1 root     root             7 Feb 15  2021 TZ -> /tmp/TZ
-rw-r--r--    1 root     root           397 Feb 15  2021 banner
-rw-r--r--    1 root     root           461 Feb 15  2021 banner.failsafe
drwxr-xr-x    2 root     root            74 Feb 15  2021 board.d
-rw-r--r--    1 root     root          1533 Feb 27  2021 board.json
drwxr-xr-x    1 root     root     18446744073709551504 Oct  4 13:00 config
drwxr-xr-x    1 root     root           224 Mar  7  2021 crontabs
-rw-r--r--    1 root     root           123 Feb 15  2021 device_info
-rw-r--r--    1 root     root           872 Feb 15  2021 diag.sh
-rw-------    1 root     root            29 Jun 14 17:25 dnsmasq.conf
drwxr-xr-x    1 root     root           312 Aug 12 21:58 dropbear

Thanks for the useful application.