M BUZZ CRAZE NEWS
// news

What characters to escape in terminal?

By Jessica Wood

I know, that there are several characters that should be escaped. For example:

$ cd /home/Username\ with\ spaces/Desktop

I know another option is to enclose it in single-quotes.

$ cd '/home/Username with spaces/Desktop'

Is there a complete list of these characters? Or any rule of thumb?

1

1 Answer

I have wished for a "complete list". I used to have a filter program compiled that would escape every "special character" that I could think of.

A good start: ! ? $ % $ # & * ( ) blank tab | ' ; " < > \ ~ ` [ ] { }

I'm sure there are others that I have missed.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy