1
0

cleanname 580 B

1234567891011121314151617181920212223242526272829303132
  1. .TH CLEANNAME 1
  2. .SH NAME
  3. cleanname \- clean a path name
  4. .SH SYNOPSIS
  5. .B cleanname
  6. [
  7. .B -d
  8. .I pwd
  9. ]
  10. .I names ...
  11. .SH DESCRIPTION
  12. For each file name argument,
  13. .IR cleanname ,
  14. by lexical processing only,
  15. prints the shortest equivalent string that names the same
  16. (possibly hypothetical) file.
  17. It eliminates multiple and trailing slashes, and it lexically
  18. interprets
  19. .B .
  20. and
  21. .B ..
  22. directory components in the name.
  23. If the
  24. .B -d
  25. option is present,
  26. unrooted names are prefixed with
  27. .IB pwd /
  28. before processing.
  29. .SH SOURCE
  30. .B /sys/src/cmd/cleanname.c
  31. .SH SEE ALSO
  32. .IR cleanname (2).