Is there a command line tool in linux that will 'normalize' a filename? i.e. remove all "xx/./xx" parts, or "myfolder/../myotherfolder" parts?
feedback
|
|
Actually, it is realpath: http://linux.about.com/library/cmd/blcmdl3%5Frealpath.htm There is also a command-line version: cyberciti.biz/faq/unix-linux-bsd-find-real-physical-path/ But on my CentOS 5 it is not available by default. Also there is a "cheating way":
| |||||
feedback
|
|
I believe this is called 'canonicalizing'. | |||||||
feedback
|
|
Are ou asking for the basename command ?
And there is also the other part : dirname
| |||
feedback
|
|
With python line command:
| |||
|
feedback
|