[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.1.15); problems with filenames containing spaces or beginni

From: Michael Albinus
Subject: Re: tramp (2.1.15); problems with filenames containing spaces or beginning with '--'
Date: Sun, 24 May 2009 22:56:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

Alexey Lebedeff <address@hidden> writes:

> When listing remote directory, tramp issues command like this:
> cd /home/binarin/; echo "("; (/bin/ls -a | xargs /usr/bin/stat -c '("%n" 
> ("%N") %h "%U" "%G" %X.0 %Y.0 %Z.0 %s.0 "%A" t %i.0 -1)'); echo ")" 
> 2>/dev/null; echo tramp_exit_status $?
> For filenames containing spaces, this command tries to stat not
> filename as a whole, but each separated by spaces part of filename,
> resulting in many errors like this:
> /usr/bin/stat: cannot stat `...`
> For filenames that begins with '--' it breaks completly, because stat
> complains and produces no output at all:
> /usr/bin/stat: unrecognized option '--test'
> Command for listing need to be replaced with something in spirit of following:
> (find . -maxdepth 1 -printf '%f\0'; perl -e 'print "..\0"')  | xargs -0 
> /usr/bin/stat -c '("%n" ("%N") %h "%U" "%G" %X.0 %Y.0 %Z.0 %s.0 "%A" t %i.0 
> -1)' --

I see the intention. No problem to change it, but I don't know about
compatibility of "xargs -0" and existence of perl on remote machines.

A simple "ls -aQ" might do the job as well, but there is the same
question about compatibility of the "-Q" argument ... we have removed
the "-b" argument from the ls command recently, because it is not
supported on OpenBSD. Hmm.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]