Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supress "lsd: <file> Permission denied (os error 13)" messages when calculating file/dir sizes #781

Open
Zazucki opened this issue Dec 20, 2022 · 1 comment

Comments

@Zazucki
Copy link

Zazucki commented Dec 20, 2022

I didn't have this "os error 13' until I turned on calculating file sizes always. I (maybe) understand that the error is just the user running lsd not having access to the file it's trying to get the size of (and maybe some other properties) when trying to create the listing. It would be great to be able to (optionally) suppress these messages for a cleaner output, despite it being somewhat inaccurate.

@meain
Copy link
Member

meain commented Dec 21, 2022

When you add the flag to calculate file sizes, we try to lookup all the files and folders underneath the folder you specified inorder to sum up the sizes. This means you will have to have access to all the files and folders underneath the folder that you specify. If you want to suppress the error message you can always redirect the error output to /dev/null.

lsd --total-size -l 2>/dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants