編集する

編集する

アーチLinux。

私のNASにCIFSマウントがあり、フル権限でマウントされています。

# line from my fstab
//IP_ADDRESS/path/to/dir    /path/to/local/dir    cifs    uid=my_user,gid=my_group,dir_mode=0777,file_mode=0777,credentials=path/to/my/creds    0    0

ディレクトリの作成に失敗します。

mkdir path/to/local/dir/subdir
mkdir: cannot create directory '/path/to/local/dir/subdir': File exists

しかし、私が知っている限りいいえ存在する:

ls -la path/to/local/dir
drwxrwxrwx me me 0 date .
drwxrwxrwx me me 0 date ..

私のNASにあるファイルを見ると、サブディレクトリはリモートに存在しません。混乱しています。これを検索すると、ドットファイルが何であるかを理解していない人の結果がたくさん出ます。

何を提供しますか?

編集する

細部にちょっとした抵抗があったので(十分に公平だ)ここに精密コマンドと出力。これ/mnt/nas/SteamLibraryはNAS内のフォルダのローカルマウントポイントです。

[I] ⋊> ~ ls -la /mnt/nas/SteamLibrary/steamapps/downloading             
17:19:56ls: cannot access '/mnt/nas/SteamLibrary/steamapps/downloading': No such file or directory
[I] ⋊> ~ mkdir /mnt/nas/SteamLibrary/steamapps/downloading              
17:20:33mkdir: cannot create directory ‘/mnt/nas/SteamLibrary/steamapps/downloading’: File exists
[I] ⋊> ~ ls -la /mnt/nas/SteamLibrary/steamapps/                        
17:20:41total 108K
drwxrwxrwx 2 jsmith jsmith    0 Apr 18 21:30 .
drwxrwxrwx 2 jsmith jsmith    0 Apr 19 13:49 ..
drwxrwxrwx 2 jsmith jsmith    0 Apr 17 16:05 common
drwxrwxrwx 2 jsmith jsmith    0 Apr 17 16:04 compatdata
drwxrwxrwx 2 jsmith jsmith    0 Apr 17 16:03 shadercache
drwxrwxrwx 2 jsmith jsmith    0 Apr 17 16:05 temp
drwxrwxrwx 2 jsmith jsmith    0 Aug 10  2020 workshop
-rwxrwxrwx 1 jsmith jsmith 1.2K Feb 27 16:40 appmanifest_102500.acf
-rwxrwxrwx 1 jsmith jsmith  686 Feb 27 16:40 appmanifest_107300.acf
-rwxrwxrwx 1 jsmith jsmith  694 Feb 27 16:40 appmanifest_107310.acf
-rwxrwxrwx 1 jsmith jsmith  498 Apr 19 13:50 appmanifest_1391110.acf
-rwxrwxrwx 1 jsmith jsmith  483 Apr 19 13:50 appmanifest_1493710.acf
-rwxrwxrwx 1 jsmith jsmith  745 Feb 27 16:40 appmanifest_207320.acf
-rwxrwxrwx 1 jsmith jsmith  863 Feb 27 16:41 appmanifest_219780.acf
-rwxrwxrwx 1 jsmith jsmith  691 Apr 17 16:03 appmanifest_22320.acf
-rwxrwxrwx 1 jsmith jsmith  837 Apr 19 13:50 appmanifest_22330.acf
-rwxrwxrwx 1 jsmith jsmith  516 Feb 27 16:59 appmanifest_256460.acf
-rwxrwxrwx 1 jsmith jsmith 1.2K Feb 27 16:59 appmanifest_292030.acf
-rwxrwxrwx 1 jsmith jsmith  825 Feb 27 16:40 appmanifest_312540.acf
-rwxrwxrwx 1 jsmith jsmith 1.1K Apr 17 16:03 appmanifest_340170.acf
-rwxrwxrwx 1 jsmith jsmith 1.1K Feb 27 16:40 appmanifest_351970.acf
-rwxrwxrwx 1 jsmith jsmith  894 Feb 27 16:40 appmanifest_367500.acf
-rwxrwxrwx 1 jsmith jsmith  773 Feb 27 16:40 appmanifest_372360.acf
-rwxrwxrwx 1 jsmith jsmith 1.5K Feb 27 16:37 appmanifest_379720.acf
-rwxrwxrwx 1 jsmith jsmith  599 Apr 17 16:20 appmanifest_391540.acf
-rwxrwxrwx 1 jsmith jsmith  665 Apr 19 13:49 appmanifest_406110.acf
-rwxrwxrwx 1 jsmith jsmith  685 Feb 27 16:59 appmanifest_418340.acf
-rwxrwxrwx 1 jsmith jsmith  794 Feb 27 16:40 appmanifest_429660.acf
-rwxrwxrwx 1 jsmith jsmith  985 Feb 27 16:40 appmanifest_489830.acf
-rwxrwxrwx 1 jsmith jsmith  612 Feb 27 16:59 appmanifest_506510.acf
-rwxrwxrwx 1 jsmith jsmith  667 Feb 27 16:41 appmanifest_522530.acf
-rwxrwxrwx 1 jsmith jsmith  708 Feb 27 16:41 appmanifest_525240.acf
-rwxrwxrwx 1 jsmith jsmith  891 Apr 17 16:03 appmanifest_538680.acf
-rwxrwxrwx 1 jsmith jsmith 1.1K Feb 27 16:40 appmanifest_72850.acf

ベストアンサー1

ls -la /path/to/dirリスト(必須.と項目を除いて..空)コンテンツdir

-dディレクトリ自体を表示するには、このオプションを使用します。

ls -ld /path/to/dir

読み取りにはman lsさまざまなオプションがあります。スクリプトでman stat「分析」エラーが発生する前に、この内容をお読みください。ls

おすすめ記事