Find the answer to your Linux question:
Results 1 to 4 of 4
I'm removing stuff from my desktop and I've been trying to remove "tyler's Home" now for a while. I know ' is used in commands sometimes and it's reading the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390

    Deleting a file with a ' in the name


    I'm removing stuff from my desktop and I've been trying to remove "tyler's Home" now for a while. I know ' is used in commands sometimes and it's reading the ' in the name as one of those things. How do I work with files with ' marks in the names?

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Just escape it, like this:
    Code:
    rm tyler\'s\ Home
    Or, just start typing tyler, and then press tab to have the filename completed in a safe way.

  3. #3
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    Thanks. I would have used tab but it doesn't do anything for me for some reason.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Apr 2003
    Location
    UK, Manchester
    Posts
    147
    You could also encapsulate it with "". rm -rf "tyler's Home" would also work.
    I find it easier to type.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •