我应该使用什么命令来显示有关目录的特定信息,而不是其内容?

What command should I use to display specific information about a directory, not its content?

我需要知道如何显示有关目录本身的信息。

我曾尝试在我想知道的目录所在的目录上使用 ls -l,但没有成功。

使用此命令(-d 标志将使 ls 仅显示目录):

ls -ld directoryname

如果您正在寻找更详细的信息,可以使用 stat 命令 (more info on stat):

stat directoryname

这是 stat 将 return:

的例子