Unable to list the contents of a symbolic directory
- os: Ubuntu 20.10
lsd --version: 0.20.1echo $TERM: xterm-256colorecho $LS_COLORS:
I have a symbolic link to folder that I use to store music. There's over 3K files with over 400 directories that fails to display with lsd. On the other hand lsd displays the contents of another symbolic linked directory containing 3 items. ls and tree work fine in displaying the contents.
Expected behavior
Display the contents of a directory A where A is a symbolic link.
Actual behavior
lsd returns with "Invalid argument (os error 22)"
Are you able to display the contents when you directly try to list the folder instead of the symlink?
No.
@maleyva1 can you paste some example output of the lsd and ls, so that we can try to find out what the problem might be?
hi @maleyva1 thanks for sharing the screencast, I noticed the error output but still has no clue about the cause, can you help to make sure 2 more things:
- is there an alias for lsd? try to check it with
type lsdand unalias it. - maybe there are some filenames that make it error, try to check it with
for i in `ls`; do out=`lsd $i`; if [ $? != 0 ]; then echo "$i: $out"; fi; done
sorry for my mistake, there are some bugs in my command, please try this again:
for i in . ; do out=`lsd $i 2>&1`; if echo $out | grep error >/dev/null 2>&1 ; then echo "$i: $out" ; fi; done
BTW, the bugs are:
- there are spaces inside your filenames and I did not consider it.
- lsd does not return an error code when errors occurred, I will create an issue for this
@maleyva1 Sorry that we are making you run quite a few scripts. But if you don't mind sharing your music collection could you post the output file generated by this.
for i in *;do printf "%s : " "$i"; lsd -d -l "$i"; done > output
@meain It's a bit long but here you go: output.txt
Is there any network disk mounting under this dir?
@zwpaper No.