文件操作 - commonpath.yml
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3.12/site-packages/ansible/plugins/filter/commonpath.yml
编辑文件内容
DOCUMENTATION: name: commonpath author: Shivam Durgbuns version_added: "2.15" short_description: gets the common path description: - Returns the longest common path from the given list of paths. options: _input: description: A list of paths. type: list elements: path required: true seealso: - plugin: ansible.builtin.basename plugin_type: filter EXAMPLES: | # To get the longest common path (for example - '/foo/bar') from the given list of paths # (for example - ['/foo/bar/foobar','/foo/bar']) {{ listofpaths | commonpath }} RETURN: _value: description: The longest common path from the given list of paths. type: path
修改文件时间
将文件时间修改为当前时间的前一年
删除文件