If it has a meaning beyond its literal meaning, a meta-meaning, then we refer to it as a special character.
Questions tagged [special-characters]
241 questions
320
votes
14 answers
What is `^M` and how do I get rid of it?
When I open the file in Vim, I see strange ^M characters.
Unfortunately, the world's favorite search engine does not do well with special characters in queries, so I'm asking here:
What is this ^M character?
How could it have got there?
How do I…
Christoph Wurm
- 5,678
- 5
- 25
- 28
179
votes
7 answers
Can't use exclamation mark (!) in bash?
I'm trying to use the curl command to access a http url with a exclamation mark (!) in its path. e.g:
curl -v "http://example.org/!287s87asdjh2/somepath/someresource"
the console replies with bash: ... event not found.
What is going on here? and…
netbrain
- 2,125
- 2
- 15
- 12
114
votes
2 answers
Is Vim immune to copy-paste attack?
You should never paste from web to your terminal. Instead, you should paste to your text editor, check the command and then paste to the terminal.
That's OK, but what if Vim is my text editor? Could one forge a content that switches Vim to command…
Adam Trhon
- 1,623
- 3
- 17
- 20
82
votes
7 answers
How safe is it to cat an arbitrary file?
Sometimes when I cat a binary file by mistake, my terminal gets garbled up. Nothing a quick reset can't fix, but couldn't an attacker theoretically create a file that, when displayed on a terminal, would execute some arbitrary code? Through an…
Gunchars
- 911
- 1
- 6
- 7
55
votes
16 answers
How can I delete a file which filename has non-printing characters
I somehow managed to create a file that doesn't seem to have a filename. I found some information regarding how to get more details of the file in the following thread.
However, I tried some of the suggestions listed and can't seem to delete the…
Mr Moose
- 715
- 2
- 7
- 8
42
votes
3 answers
What is the Mode_switch modifier for?
Playing with xmodmap I encountered a modifier key I hadn't heard of: Mode_switch. It seems to have something to do with inserting special characters.
I assigned it to a key but it seems to have no effect. What is it for? Is it different from…
deprecated
- 2,841
- 4
- 24
- 22
38
votes
11 answers
How do I type the degree symbol under X11 (using a default English keyboard layout)?
I'm trying to put in an email the temperature outside in degrees. On my Mac, the degree symbol (°) is Option+Shift+8. But I'm writing the email in Thunderbird on an Ubuntu 10.10 with the default US English keyboard layout. What key combination do I…
Josh
- 8,311
- 12
- 54
- 73
36
votes
2 answers
What does the tilde (~) mean at the end of a filename?
What is the file with the ~ at the end of the filename for?
$ ls # aliased to add flags
-rwxrwxr-x 1 durrantm 2741 May 16 09:28 strip_out_rspec_prep_cmds.sh~*
drwxrwxr-x 13 durrantm 4096 May 16 14:21 ../
-rwxrwxr-x 1 durrantm 2221 May 16 14:58…
Michael Durrant
- 41,213
- 69
- 165
- 232
32
votes
2 answers
How to avoid escape sequence attacks in terminals?
Reading the details of CVE-2009-4487 (which is about the danger of escape sequences in log files) I am a bit surprised.
To quote CVE-2009-4487:
nginx 0.7.64 writes data to a log file without sanitizing non-printable characters, which might allow…
maxschlepzig
- 56,316
- 50
- 205
- 279
30
votes
2 answers
"Ctrl + ." displays "e" character and captures the keyboard shortcut
For a few days now I can no longer use Ctrl+. anywhere (which makes working with Vs Code pretty frustrating). Instead of executing the shortcut an e appears. I can then write normally, and when pressing Enter the e disappears. This is similar to the…
Aram Becker
- 323
- 3
- 12
29
votes
10 answers
Dealing with file names with special first characters (ex. ♫)
I have recently come across a file whose name begins with the character '♫'. I wanted to copy this file, feed it into ffmpeg, and reference it in various other ways in the terminal. I usually auto-complete weird filenames but this fails as I cannot…
ZirconCode
- 513
- 1
- 5
- 14
27
votes
2 answers
What does CTRL+4 (and CTRL+\) do in bash?
I just found out by accident that CTRL + 4 closes programs reading stdin input from the command-line.
This is how it looks when I type CTRL + 4 or CTRL + / into programs reading stdin
$ cat
wefwef
wefwef
^\Quit
$ bc
bc 1.06.95
Copyright…
wefwefa3
- 1,345
- 5
- 15
- 27
26
votes
8 answers
how to type “smart quotes” (U+201C, U+201D)
It's like this: “ (U+201C) ” (U+201D).
xzhu
- 1,272
- 2
- 11
- 8
26
votes
3 answers
Understanding Unix file name encoding
I have a hard time understanding how the file name encoding works. On unix.SE
I find contradicting explanations.
File names are stored as characters
To quote another answer:
Several questions about file-system character encoding on linux
[…] as you…
Marco
- 33,188
- 10
- 112
- 146
22
votes
2 answers
Grep: unexpected results when searching for words in heading from man page
I'm running into weird behavior when trying to grep a man page on macOS. For example, the Bash man page clearly has an occurrence of the string NAME:
$ man bash | head -5 | tail -1
NAME
And if I grep for name I do get results, but if I grep for…
ivan
- 1,858
- 2
- 19
- 37