Switching

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  * after file name?

    Posted 02-23-2012 07:43

    Hi

     

    What does a * mean after a file name in Junos?

    Thanks

     

    Example:

     

    {master:0}
    admin@SON> file list /var/sw/pkg

    /var/sw/pkg:

    jloader-ex-3242-11.3-20110310.0-signed.gz
    jloader-ex-3242-11.3I20110326_0802_hmerge-signed.tgz*

    {master:0}
    admin@SON>

     



  • 2.  RE: * after file name?
    Best Answer

    Posted 02-23-2012 21:19
    man ls
    <snip>
    
         -F      Display a slash (`/') immediately after each pathname that is a directory, an asterisk (`*')
                 after each that is executable, an at sign (`@') after each symbolic link, an equals sign (`=')
                 after each socket, a percent sign (`%') after each whiteout, and a vertical bar (`|') after
                 each that is a FIFO.

     

    I believe the "file list" really is an "ls -F" in freeBSD.... or something like that.

     

    dude@ex3200-1# run file list /var/tmp 
    
    /var/tmp:
    .snap/
    gres-tp/
    hello.exe*
    krt_gencfg_filter.txt
    vi.recover/
    
    [edit]
    dude@ex3200-1# run start shell 
    % ls /var/tmp
    gres-tp			hello.exe		krt_gencfg_filter.txt	vi.recover
    % 
    % ls -F /var/tmp
    gres-tp/		hello.exe*		krt_gencfg_filter.txt	vi.recover/

     



  • 3.  RE: * after file name?

    Posted 02-24-2012 05:21

    Hi,

     

    ls-f  does not display an * after my tgz files. I think that the * for the file list command is inserted by Junos. When you display interfaces, * means active interface - but for files?

     

     

    root@SON:RE:0% ls -f
    jloader-ex-3242-11.3-20110310.0-signed.gz
    jloader-ex-3242-11.3I20110326_0802_hmerge-signed.tgz
    root@SON:RE:0%

     



  • 4.  RE: * after file name?

    Posted 02-24-2012 12:40

    @davben wrote:

     

    ls-f  does not display an * after my tgz files.


    Unix is case-sensitive.  "ls -f" and "ls -F" are not the same thing.



  • 5.  RE: * after file name?

    Posted 02-26-2012 08:49
    JulioCassetez is correct - it's using ls -F in the background. The * indicates that the execute bit is set (chmod +x or -x on a file to set or clear for all users).

    The fact that it is set on that file probably has more to do with where it came from and how it got there than anything else.

    :w


  • 6.  RE: * after file name?

    Posted 02-27-2012 05:37

    Thanks guys!