Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have seen a strange directory on my linux server.. Here it is:

drwxr-xr-x 2 root root 4096 Jan 12 2005 \t\t\t\t/

How can i escape \t under shell? Thanks!

share|improve this question

"\t\t\t\t" or \\t\\t\\t\\t

share|improve this answer

"\t" may be a tab character. That is, the directory's name may be <tab><tab><tab><tab>. You can try combinations of literal \ (which needs to be escaped, so you type \\) and t and tab or use globbing. I'd recommend globbing, so (assuming there are no other oddly named directories in this directory)

mv \<tab>* mystery-dir
mv \\* mystery-dir
mv \\t* mystery-dir

one of these should work.

share|improve this answer

If you are seeing that with the -b option of ls, then those are tab characters. Here is one way rename it:

mv $'\t\t\t\t' new_name

In this case, you type the individual backslash and "t" characters and the $'...' converts it to tabs for you. It makes it easier to read the command than trying to insert the right number of tabs using Ctrl-v Tab repeatedly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.