Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

is there any chance of having the autocompletion feature of the root account for a normal user account.

For example, I created a regular user with sudo capabilities. When I want to do a apache error log tail, I must type all the directories manually.

tail -f /var/log/httpd/error_log

With the root account, it will be as simple as:

tail -f /v<tab>/l<tab>/ht<tab>/er<tab>

Where is a tab keypress.

I understand that this is the normal behaviour when the user has no access to that directories, but is there any more comfortable form of doing it?

Thanks in advance!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

is there any chance of having the autocompletion feature of the root account for a normal user account.

If the user does not have access to the folder in which the files exist, it would be a huge security vulnerability to allow users to view what files exist. So no, short of sudo'ing to a superuser who has access, you can't have autocomplete functionality.

share|improve this answer

So there's two possibilities here.

  1. You could have no read and execute privlidges on that directory. In the example given, that is in fact the case (given normal permissions). You could do a chmod +rx on that directory, but most would consider that a security hole. Other than that, there's no real solution.

  2. You could have autocompletion turned off in your user shell. If doing ls on your home directory produces nothing, than try adding the following to your cshrc..

 

set autolist
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.