Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Linux の C++ では、remove() のマニュアル ページに次のように記載されていることがわかります。
remove はファイルシステムから名前を削除します。ファイルに対しては unlink を、ディレクトリに対しては rmdir を呼び出します。
ファイルで remove() と unlink() の呼び出しに違いがあるかどうか疑問に思っていますか? おそらく唯一の違いは、ディレクトリを処理する必要がないという点で unlink() の方がわずかに高速であることです。