File: access.exp

package info (click to toggle)
findutils 4.10.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 26,108 kB
  • sloc: ansic: 126,635; sh: 11,486; yacc: 1,852; makefile: 844; exp: 839; python: 66; sed: 16
file content (14 lines) | stat: -rw-r--r-- 440 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# tests for -readable, -writable, -executable
exec rm -rf tmp
exec mkdir tmp
if { ! [ fs_superuser ] } {
    touch tmp/x tmp/w tmp/r tmp/rw tmp/rwx tmp/0
    exec chmod 400 tmp/r
    exec chmod 200 tmp/w
    exec chmod 100 tmp/x
    exec chmod 000 tmp/0
    exec chmod 600 tmp/rw
    exec chmod 700 tmp/rwx
    find_start p {tmp -readable -printf "r %p\n" , -writable -printf "w %p\n" , -executable  -printf "x %p\n"}
    exec rm -rf tmp
}