Ubiquiti UniFi Command-Line Interface Reference
Please share with your friends...
  • 2
  • 1
  •  
  •  
  • 1
  • 1
  •  
  •  
  •  
  •  
    5
    Shares


⇐ BackPageNext ⇒
Commands

L

ABCDEFGHIJKLMNOPQRSTUVWXYZ


ldd

Print shared library dependencies.

ldd [OPTION]... FILE...


length

Print STRING’s length.

length STRING
Example

The following example shows how to display the length of a string.

# length $PATH
29
[_/su_spoiler]


less

View a file or list of files. The position within files can be changed, and files can be manipulated in various ways.

less [-EMNmh~I?] [FILE]...

        -E      Quit once the end of a file is reached
        -M,-m   Display status line with line numbers
                and percentage through the file
        -N      Prefix line number to each line
        -I      Ignore case in all searches
        -~      Suppress ~s displayed past the end of the file


ln

Create a link LINK or DIRECTORY/TARGET to the specified TARGET(s).

ln [OPTIONS] TARGET... LINK|DIRECTORY

        -s      Make symlinks instead of hardlinks
        -f      Remove existing destination files
        -n      Don't dereference symlinks - treat like normal file
        -b      Make a backup of the target (if exists) before link operation
        -S suf  Use suffix instead of ~ when making backup files


lock
lock [-suw] 

        -s      Use shared locking
        -u      Unlock
        -w      Wait for the lock to become free, don't acquire lock


logger

Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.

logger [OPTIONS] [MESSAGE]

        -s      Log to stderr as well as the system log
        -t TAG  Log using the specified tag (defaults to user name)
        -p PRIO Priority (numeric or facility.level pair)


login

Begin a new session on the system.

login [-p] [-h HOST] [[-f] USER]

        -f      Do not authenticate (user already authenticated)
        -h      Name of the remote host
        -p      Preserve environment


logread

Show messages in syslogd’s circular buffer.

logread [OPTIONS]

        -f      Output data as log grows


ls

List directory contents.

ls [-1AacCdeFilnpLRrSsTtuvwxXhk] [FILE]...

        -1      List in a single column
        -A      Don't list . and ..
        -a      Don't hide entries starting with .
        -C      List by columns
        -c      With -l: sort by ctime
        --color[={always,never,auto}]   Control coloring
        -d      List directory entries instead of contents
        -e      List full date and time
        -F      Append indicator (one of */=@|) to entries
        -i      List inode numbers
        -l      Long listing format
        -n      List numeric UIDs and GIDs instead of names
        -p      Append indicator (one of /=@|) to entries
        -L      List entries pointed to by symlinks
        -R      List subdirectories recursively
        -r      Sort in reverse order
        -S      Sort by file size
        -s      List the size of each file, in blocks
        -T NUM  Assume tabstop every NUM columns
        -t      With -l: sort by modification time
        -u      With -l: sort by access time
        -v      Sort by version
        -w NUM  Assume the terminal is NUM columns wide
        -x      List by lines
        -X      Sort by extension
        -h      List sizes in human readable format (1K 243M 2G)
Example

The following example shows how to list directory contents.

# ls -al /bin
drwxr-xr-x    2 ubnt     admin            0 Apr 17 03:50 .
drwxr-xr-x   10 ubnt     admin            0 Jan  1  1970 ..
lrwxrwxrwx    1 ubnt     admin           17 Apr 17 03:50 [ -> ../../bin/busybox
lrwxrwxrwx    1 ubnt     admin           17 Apr 17 03:50 [[ -> ../../bin/busybox
-rwxr-xr-x    1 ubnt     admin         3542 Apr 17 03:43 adjtimex
lrwxrwxrwx    1 ubnt     admin           14 Apr 17 03:50 arp -> ../bin/busybox
lrwxrwxrwx    1 ubnt     admin           17 Apr 17 03:50 arping -> ../../bin/busybox
lrwxrwxrwx    1 ubnt     admin            7 Apr 17 03:50 ash -> busybox
lrwxrwxrwx    1 ubnt     admin           17 Apr 17 03:50 awk -> ../../bin/busybox
lrwxrwxrwx    1 ubnt     admin           17 Apr 17 03:50 basename -> ../../bin/busybox
lrwxrwxrwx    1 ubnt     admin           17 Apr 17 03:50 brctl -> ../../bin/busybox
lrwxrwxrwx    1 ubnt     admin           17 Apr 17 03:50 bunzip2 -> ../../bin/busybox
-rwxr-xr-x    1 ubnt     admin       484933 Apr 17 03:44 busybox
[_/su_spoiler]


lsmod

List the currently loaded kernel modules.

lsmod
Example: UniFi AP AC (UAP-ACv2)

The following example shows how to display the currently loaded kernel modules.

# lsmod
Module                  Size  Used by    Tainted: PF
x_tables               13104  0
wl                   5871216  0
et                     67760  0
igs                   140976  1 wl
emf                   144384  2 wl,igs
ctf                   144448  0
ubnt_common             5632  1 wl
gpiodev                 9680  0
ubnthal                47296  1 wl
[_/su_spoiler]
Example: UniFi Switch 48 750W (USW-48P-750)

The following example shows how to display the currently loaded kernel modules.

# lsmod
Module                  Size  Used by    Tainted: P
linux_user_bde        107570  0
linux_kernel_bde      123344  1 linux_user_bde
gpiodev                 5702  0
ubnthal                55616  1 linux_kernel_bde
[_/su_spoiler]


lzcat

Decompress to stdout.

lzcat FILE
ABCDEFGHIJKLMNOPQRSTUVWXYZ
⇐ BackPageNext ⇒

Ubiquiti UniFi Command-Line Interface Reference

Please share with your friends...
  • 2
  • 1
  •  
  •  
  • 1
  • 1
  •  
  •  
  •  
  •  
    5
    Shares
Tagged on:                     

Leave a Reply