Table of Contents
Ubuntu - Bash - Scripts - ll
Long listing of files
Usage
ll [-m] [ls options] file [file...]
Code
#!/bin/bash # # @(#) ll v1.0 Long listing of files. if [ "$1" = "-m" ] then MORE="| /usr/bin/more" shift else MORE="" fi eval /bin/ls -al $@ MORE
Example
Issuing a list of files with source code on C language in the long format.
ll *.c
Displays a list of all files in the directory /etc, the names of which can be in variance of the word mount (for example, mount, umount, unmountable).
ll /etc/*mount*
First, the who command is executed, where the result is passed to the awk command , which cuts out the device name and prefixes it with /dev/.
As a result, a list of full path names of all terminal devices registered in the system, is passed to the ls -li command line.
The printout returns the information about the inode (inode) for each terminal device due to the -i flag.
ll -i `who|awk '{print "/dev/" $2}'`
Displays a long list format all archive files in a directory /lib. This directory contains library for the system compilers.
ll `kind -a /lib`
Displays all the usual information plus inode number for all files in the directory /dev a page at a time.
ll -m -i /dev