Lsd: Unable to list the contents of a symbolic directory

Created on 10 Mar 2021  路  12Comments  路  Source: Peltoche/lsd

  • os: Ubuntu 20.10
  • lsd --version: 0.20.1
  • echo $TERM: xterm-256color
  • echo $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)"

kinbug need-more-info

All 12 comments

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?

@zwpaper

asciicast

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:

  1. is there an alias for lsd? try to check it with type lsd and unalias it.
  2. 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

@zwpaper

  1. No. I have ls aliased to lsd.
  2. Here's a screencast of the output: asciicast

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:

  1. there are spaces inside your filenames and I did not consider it.
  2. lsd does not return an error code when errors occurred, I will create an issue for this

@zwpaper
No problem. I appreciate the help. Here's the screencast of the command: asciicast

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ngirard picture ngirard  路  6Comments

jfernandz picture jfernandz  路  6Comments

hawkw picture hawkw  路  5Comments

Koovu picture Koovu  路  7Comments

saumyajyoti picture saumyajyoti  路  7Comments