Dariusz
> I want to have ftpd chrooted so I need statically compiled ls. I tried
> to compile it with -static switch, compilation succeed but I got
> ls with size around 1 Mb :(
A static ls is not needed to run ftpd chrooted. Instead it is only
necessary to include in the chrooted environment a copy of the shared
libraries that the command needs. That can be determined using the
'ldd' command. Place the shared libraries into the same relative
position in the chrooted environment as they are in normally.
> Could you point me how to compile ls and got "normal" size. I think
> "normal" size should be something around 20-30kb.
You probably compiled it by default with -g, debug on, which included
all of the debug symbols. Try compiling -O and then running 'strip'
on the executable. But I still expect it to be large. ls has many
features and will need many libc features.
Bob