Alexey Lebedeff <[email protected]> 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. _______________________________________________ Tramp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/tramp-devel
