1

When I try to Tab the way like

/etc/freeradius/3.0/sites-available

Tab doesn't show me variants of files that are inside the directory and also doesn't allow me to autocomplete this way. How can I fix this? The problem goes away when I do this from the root user, but it is very risky. I am using Ubuntu Server 20.04 LTS with its default terminal.

I cannot cd to this folder without sudo privileges. But I also don't want to stay under root, because it can be dangerous (remember those nice Perl scripts, that suddenly perform rm -rf). Is there a way to see the content of folders without sudo privileges? I can make sudo and then command, but I don't want to change to root whenever I want to see the content.

4
  • If you don't have read permission for the directory, you can't list the files, and therefore can't have tab autocompletion. Otherwise, you could simply try TAB until you had listed all the files, and you didn't need read permission for the directory in the first place.
    – Jos
    Jun 15, 2020 at 14:18
  • 1
    Welcome to Ask Ubuntu! Is the folder readable for your regular user? Are you just entering a sudo command or opening a root’s prompt using sudo?
    – Melebius
    Jun 15, 2020 at 14:18
  • 1
    @Melebius, no I cannot cd to this folder without sudo privilegies. But I also don't want to stay under root, because it can be dangerous (remember those nice perl scripts, that suddenly perform rm -rf). Is there a way to see a content of folders without sudo privilegies? I can make sudo and then command, but I don't want to change to root everytime when I want to see content Jun 16, 2020 at 7:41
  • Thanks for posting the details. I added them into the question, so they can be found without digging into comments. Unfortunately, I don’t know the right solution for you. I am also interested in whether there is a way.
    – Melebius
    Jun 16, 2020 at 8:08

0

You must log in to answer this question.

Browse other questions tagged .