ad: Amateur-1

What does * in Linux directory do?

Discussion in 'Computers, Hardware, and Operating Systems' started by AA7EJ, Sep 7, 2017.

ad: L-HROutlet
ad: l-rl
ad: L-MFJ
ad: Subscribe
ad: l-assoc
  1. AA7EJ

    AA7EJ Ham Member QRZ Page

    Yes, I did try to Google it , but getting nowhere fast.
    In DOS an asterisk stands for ANY character(s) , and it works same in Linux.
    For example I am accessing my "default file" using "/root/*".
    Apparently "recent " poorly / undocumented (?) addition to Linux?

    73 Shirley
  2. AG6QR

    AG6QR Subscriber QRZ Page

    It's similar to DOS, but in Linux it's done by the shell, not by the command itself. If you google "linux globbing" you'll get many more hits.

    It's not a recent addition; it has been a part of Unix since long before Linux was conceived.
    K1ABX likes this.
  3. ND5Y

    ND5Y Ham Member QRZ Page

  4. W6RZ

    W6RZ Ham Member QRZ Page

    The more important question would be "What are you doing in /root?".

    For the vast majority of computing on Linux, you should never have to use /root.
    KD4MOJ likes this.
  5. KA9JLM

    KA9JLM Ham Member QRZ Page

    Gazing at the stars. o_O
  6. KB3VWG

    KB3VWG Ham Member QRZ Page

    ...and...if you're on Ubuntu, the root directory is just a user folder for the for the superuser...A.K.A. the root account...which is disabled working with globs....I also wonder what you're doing in /root...?

    Also, many people in multiple forums have shown you how to locate documentation for software on Unix-like systems - I personally suggest (again)


    - KB3VWG
  7. AA7EJ

    AA7EJ Ham Member QRZ Page

    Thanks for the reply, as always terminology is usually the issue , for me.

    As far as "/root" goes it is my understanding it is not the same as "/".
    And since it was asked - the TCF put all the target "Agent" files under "/root/*" and I do not see any point moving it elsewhere.

    73 Shirley
  8. AG6QR

    AG6QR Subscriber QRZ Page

    Correct, / isn't the same as /root .

    I don't know anything about TCF, but were you running under userid root when you ran the software that put files in /root?

    Normally, on Linux, you should do most operations as an ordinary user, NOT root. This practice helps protect against malware, and also protects against accidentally messing up system files.
  9. K5UNX

    K5UNX XML Subscriber QRZ Page

    Wow . . not recent and surely not poorly documented. I have been working on Unix/Linux for over 20 years and "*" has been there longer than that. Hopefully you are not running daily as the root user.
    KF5RRF and K6CLS like this.
  10. N2SUB

    N2SUB XML Subscriber QRZ Page

    You might consider using a symbolic link from another "safer" location to access these files instead of using the explicit path to the root directory. It could help avoid messing up the file system. But it's still yucky. ;)
    KB3VWG likes this.

Share This Page

ad: PortRo-1