Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi Thank you
when i tape du -ms /* | sort -nr
I've this message
"t access `/proc/7564/task/7564/fd/4': No such file or directory
du: cannot access `/proc/7564/task/7564/fdinfo/4': No such file or directory
du: cannot access `/proc/7564/fd/4': No such file or directory
du: cannot access `/proc/7564/fdinfo/4': No such file or directory
It will show those messages in the beginning don't worry about that let the command complete. I have checked it on my system and it works perfectly fine.
Hi thank you
Can I remove this messages and please why I have this message?
Also can I have the size in gigabyte? (I use du -hs) but the size in gygabyte ,kilo and mega
so It is not nice when I use the sort
Thank you
You can redirect the error message. If you are using -h which is for human-readable just don't use sort -nr with it as it will be confusing. You can use the following command:
2 is exit code. What I am doing here is telling the system if there is anything which has got exit status / code (2) in the output then redirect that to /dev/null
You have different exit codes like:
0 = success
1 = warning
2 = errors
You can redirect both errors and warnings in one go as follows:
Code:
du -sh /* 2>&1 /dev/null
When I will run this command any error / warnings in the output will be redirected to /dev/null
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.