gpt4 book ai didi

linux - 如何标记目录

转载 作者:太空宇宙 更新时间:2023-11-04 06:00:04 26 4
gpt4 key购买 nike

我想创建目录,例如user/foldertemporary@tmp。这个标签告诉我这个目录应该在一定时间后删除,我可以通过这个标签找到它。 Linux/Bash 中有什么命令可以帮助我解决这个问题吗?

最佳答案

您可以像使用“@tmp”一样添加文件名,也可以查看 Extended File Attributes

这是一个example使用它们:

$ setfattr -n user.comment -v "this is a comment" testfile

$ getfattr testfile

# file: testfile

user.comment

$ getfattr -n user.comment testfile

# file: testfile

user.comment="this is a comment"

关于linux - 如何标记目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47093602/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com