uutils / findutils

Rust implementation of findutils
MIT License
280 stars 35 forks source link

Implement `-xtype` #379

Open hanbings opened 1 month ago

hanbings commented 1 month 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