Where is the custom.css file in Google Chrome on Mac?

5,847

When you use a shell like Bash and enter a path that contains whitespace, it will interpret the whitespace as the argument separator. For example,

~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css

will be seen by the shell as three arguments:

~/Library/Application 
Support/Google/Chrome/Default/User 
StyleSheets/Custom.css

Logically, these don't exist. When you use open to open the CSS file, it'll tell you:

The files /Users/werner/Library/Application, /Users/werner/Support/Google/Chrome/Default/User, and /Users/werner/StyleSheets/Custom.css do not exist.

So you need to quote your variables, or escape the space:

open -e "~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css"
open -e ~/Library/Application\ Support/Google/Chrome/Default/User\ StyleSheets/Custom.css

See also Quotes and escaping. For the gory details, look at this post: Filenames in Shell

Share:
5,847

Related videos on Youtube

Karmacoma
Author by

Karmacoma

(your about me is currently blank)

Updated on September 18, 2022

Comments

  • Karmacoma
    Karmacoma over 1 year

    I'm using MacOS 10.8.3 and Chrome Version 26.0.1410.65. And i want try to change devtools style.

    When put this code on Terminal:

     ~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css
    

    Get this error:

    -bash: /Users/Baris/Library/Application: No such file or directory
    

    I checked directory paths and really i haven't Chrome directory on Application Support/Google

    Where is stored custom.css on my Mac?