LoginSignup
1
1

More than 3 years have passed since last update.

フォルダだけが削除出来ない時のlinux削除コマンド

Last updated at Posted at 2020-01-19

wordpressをインストールしたらファイルが削除できなくて焦ったのでここにLinux削除コマンドを載せておきます。

pwd

/var/www/html

ls

  • index.php

  • wp-blog-header.php

  • wp-includes //ディレクトリ

  • wp-settings.php

  • license.txt

  • wp-comments-post.php

  • wp-links-opml.php

  • wp-signup.php

  • readme.html

  • wp-config-sample.php

  • wp-load.php

  • wp-trackback.php

  • wp-activate.php

  • wp-content //ディレクトリ

  • wp-login.php

  • xmlrpc.php

  • wp-admin //ディレクトリ

  • wp-cron.php

  • wp-mail.php

rm -rf 「ディレクトリ名」で中身ごとディレクトリ削除

例:# rm -rf wp-admin

※オプション意味
-rオプションは中身ごと消す
-fオプションは「削除してもいいですか?」などの都度アナウンスをが迷惑な場合に使う

全部削除

現在いるディレクトリの中身全てけします。

# rm -rf *

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1