我遇到問題。當我在shell只使用ls
命令我的文件列表如下(怪異):如何在linux shell中使用`ls`列出文件,因爲它們在相應文件夾中列出
[HorribleSubs] Fairy Tail - 166 [720p].mkv
[HorribleSubs] Fairy Tail - 16 [720p].mkv
[HorribleSubs] Fairy Tail - 167 [720p].mkv
當我雖然打開我的文件夾,該文件列出像這樣(首選):
[HorribleSubs] Fairy Tail - 16 [720p].mkv
...
...
[HorribleSubs] Fairy Tail - 166 [720p].mkv
[HorribleSubs] Fairy Tail - 167 [720p].mkv
如何使用ls
命令在shell中列出與相應文件夾中完全相同的文件。在該文件夾中,按「名稱」排序。
當我鍵入ls -v
的情況如下表所示:
[HorribleSubs] Fairy Tail - 11 [720p].mkv
[HorribleSubs] Fairy Tail - 12 [720p].mkv
[HorribleSubs] Fairy Tail - 13 [720p].mkv
...
...
[HorribleSubs] Fairy Tail - 175 [720p].mkv
[Horriblesubs] Fairy Tail - 01 [720p].mkv
[Horriblesubs] Fairy Tail - 02 [720p].mkv
[Horriblesubs] Fairy Tail - 03 [720p].mkv
[Horriblesubs] Fairy Tail - 04 [720p].mkv
[Horriblesubs] Fairy Tail - 05 [720p].mkv
[Horriblesubs] Fairy Tail - 06 [720p].mkv
[Horriblesubs] Fairy Tail - 07 [720p].mkv
[Horriblesubs] Fairy Tail - 08 [720p].mkv
[Horriblesubs] Fairy Tail - 09 [720p].mkv
[Horriblesubs] Fairy Tail - 10 [720p].mkv
不需要python標記。推薦使用 –
。 – Kris
@Kris如果你運行'\ ls'怎麼辦? (注意反斜槓) – dogbane