Unexpected directory listing

Advertisement

htmltiger
Guest

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
36,205
Location:
Prague, Czechia

Re: Unexpected directory listing

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

Reply with quote

htmltiger
Guest

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'

Reply with quote

martin
Site Admin
martin avatar

Re: Unexpected directory listing

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

Reply with quote

htmltiger
Guest

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'

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Unexpected directory listing

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

Reply with quote

Advertisement

You can post new topics in this forum