On Monday 15 May 2017 03:31 PM, Denis Kudriashov wrote:

It returns empty string and console report:

    ls: cannot access ~: No such file or directory

Any idea why it not works properly? (from command line "ls ~" returns
expected files).

~ is a shell language synonym for $HOME. Both are expanded by the shell before calling file syscall in the kernel. Kernel's filename resolver does not do ~ or $HOME expansions.

Regards .. Subbu

Reply via email to