uutils / findutils

Rust implementation of findutils
MIT License
314 stars 38 forks source link

Implement `-xtype` #379

Closed hanbings closed 3 months ago

hanbings commented 6 months ago

refer: https://www.gnu.org/software/findutils/manual/html_node/find_html/Type.html

Test: -xtype c

This test behaves the same as ‘-type’ unless the file is a symbolic link. If the file is a symbolic link, 
the result is as follows (in the table below, ‘X’ should be understood to represent any letter except ‘l’):

‘‘-P -xtype l’’
True if the symbolic link is broken

‘‘-P -xtype X’’
True if the (ultimate) target file is of type ‘X’.

‘‘-L -xtype l’’
Always true

‘‘-L -xtype X’’
False unless the symbolic link is broken