You are not logged in.

#1 2015-03-16 14:07:36

AcousticBruce
Member
Registered: 2015-03-03
Posts: 64

Running find command cause multiple exceptions.

I have been playing around with the differences 'between' ls and 'find' commands.


 # find / -type d 

If I run this code with Arch Linux as the main OS, it stalls the OS intermittently and this type of output is displayed.

http://i107.photobucket.com/albums/m297 … 095343.jpg


Note: In VirtualBox this code runs fine.



-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Offline

#2 2015-03-16 14:20:28

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: Running find command cause multiple exceptions.

Please use thumbnails. This looks like hardware damage to me, or at least a corrupted filesystem.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2015-03-16 14:40:13

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: Running find command cause multiple exceptions.

https://ata.wiki.kernel.org/index.php/L … r_messages
"UNC    Uncorrectable error - often due to bad sectors on the disk"

Last edited by frank604 (2015-03-16 14:44:42)

Offline

#4 2015-03-16 17:58:35

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Running find command cause multiple exceptions.

When I run find on / or such I habitually send stderr to /dev/null to avoid all the damn "Permission denied" errors. This prompted me to see if there was a smarter way of doing that, but there doesn't seem to be. sad


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2015-03-16 19:08:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Running find command cause multiple exceptions.

alphaniner wrote:

When I run find on / or such I habitually send stderr to /dev/null to avoid all the damn "Permission denied" errors. This prompted me to see if there was a smarter way of doing that, but there doesn't seem to be. sad

~ $ sudo find / -ignore_readdir_race -type d | grep denied                                                
~ $ sudo find / -type d | grep denied                                                
find: `/proc/9831/task/9831/fd/5': No such file or directory
find: `/proc/9831/task/9831/fdinfo/5': No such file or directory
find: `/proc/9831/fd/5': No such file or directory
find: `/proc/9831/fdinfo/5': No such file or directory
~ $ sudo find / -ignore_readdir_race -type d | grep denied
~ $ 

Offline

#6 2015-03-16 19:22:44

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Running find command cause multiple exceptions.

@OP sorry for hijacking your thread

Well, the errors are going to stderr, so you might as well send stdout to /dev/null in your examples. And unfortunately it doesn't work when run as non-root:

$ find / -xdev >/dev/null
find: `/usr/share/polkit-1/rules.d': Permission denied
...
$ find / -xdev -ignore_readdir_race >/dev/null
find: `/usr/share/polkit-1/rules.d': Permission denied
...

Edit: also it's not "Permission denied" errors being masked avoided in your examples anyway, which is probably the real reason it doesn't work as non-root. But thanks for playing tongue

Edit2: Thanks, internets:

find / -type d ! -readable ! -executable -prune -o -print

Last edited by alphaniner (2015-03-16 19:49:09)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB