Linux forgotten commands

Lots of stuff on this page so best viewed in linux forgotten commands keyword index

ctrlaltdel
cgib
expand
chcpu
chrt
cmp
col
colrm
column
comm
cracklib-check
bz commands
dir
a2p
addpart
alternatives
dc
ddate
dd
deallocvt
debugfs
join
ul
urlview
unexpand
unhide
usleep
utmpdump
lscpu
disown
arp
timeout
patch
clockdiff
badblocks
clock/hwclock
namei
nameif
ncat
netreport
nl
nping
nslookup
getcap
groupmems
grpck
gpgv
hdparm
hostid
hoststat
htcacheclean
dash
view
ex
xargs
xzegrep
xzfgrep
factor
faillock
fgconsole
find2perl
findfs
fgrep
findmnt
fixfiles
flock
fold
fsfreeze
funzip
seq
sg
shred
shuf
size
sleep
tzselect
zipsplit
zdump
zegrep
zfgrep
zic
id
ifcfg
ifrename
insmod
installkernel
ipcalc
iw* commands
mailq
mailstat
mailstats
makewhatis
man2html
mbchk
mkdict
mountpoint
mpstat
mtr
lchage
lchfn
lchsh
ldd
lnstat
lockfile
lokkit
look
lsblk
lsinitrd
lslogins
lsmod
pidof
tac
tailf
taskset
test
tload
toe
tracepath
true
truncate
tsort
tty
readlink
paste
partx
pidstat
stat
sum
sys-unconfig
sushell
sudoedit
sudoreplay
ssltap .
rev
rename
pinky
splain
rvi
rtacct
replace
pkexec
start
stop
restart
sln
ssltap
pmap
split
sipcalc
pydoc
peekfd
pethtool
run-parts
source
type
route
rpm* commands
rotatelogs
pathchk
basename
dirname
dnsdomainname
sysrq
wget

ctrlaltdel

can either be run with:
ctrlaltdel soft or
ctrlaltdel hard

taken from the man page

a hard reset, which immediately reboots the computer without calling sync(2) and without any other preparation;
and a soft reset, which sends the SIGINT (interrupt) signal to the init process (this is always the process with PID 1). If this option is used, the init(8) program must support this feature.

cgi-bin

the directory "cgi-bin" is hardly ever used these days.
historically was the only place where executable or script code (binaries, shell scripts, etc.) could be stored. It is mostly a historic relic since most hosts allow execution of scripts from anywher

expand

The "expand" command is used to convert tabs in files to spaces more details at http://landoflinux.com/linux_expand_unexpand_command.html

chcpu

presumable a command used for hot swap cpu.

from the man page

chcpu can modify the state of CPUs. It can enable or disable CPUs, scan for new CPUs, change the CPU dispatching mode of the underlying hypervisor, and request CPUs from the hypervisor (configure) or return CPUs to the hypervisor (deconfigure).

chrt

from the man page

manipulate real-time attributes of a process

examples at http://honglus.blogspot.co.uk/2011/03/understanding-cpu-scheduling-priority.html and http://www.cyberciti.biz/faq/howto-set-real-time-scheduling-priority-process/

cmp

similar but not as useful (in most circumstances) as diff

from the man page

compare two files byte by byte

i.e cmp file1 file2

col

from the man page

filter reverse line feeds from input

col -b will not show any special character such as backspaces (useful when printing man pages)

colrm

colrm is a column removal filter not to dismilar to the cut command

Remove characters from 2nd to 5th column position
echo "testworld" | colrm 2 5

column

The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input. Empty lines are ignored.

cat file123 |column -t will display a tab separated file as columns

comm

from the man page

comm - compare two sorted files line by line

Compare sorted files FILE1 and FILE2 line by line.

With no options, produce three-column output. Column one contains lines unique to FILE1, column two contains lines unique to FILE2, and column three contains lines
common to both files.

-1 suppress column 1 (lines unique to FILE1)

-2 suppress column 2 (lines unique to FILE2)

-3 suppress column 3 (lines that appear in both files)

cracklib-check

check the security of a password

echo "test" | cracklib-check

the passwd command uses this to warn on a password change

bz commands

similar to the z command for gunzip files

bzcmp compare bzip2 compressed files
bzdiff compare bzip2 compressed files
bzip2recover recovers data from damaged bzip2 files
bzless file perusal filter for crt viewing of bzip2 compressed text
bzip2, bunzip2 a block-sorting file compressor
bzip2 -dc testfile.bz2 | less allow you to read a bz file
bzcat decompresses files to stdout

examples at http://www.thegeekstuff.com/2010/10/bzcommand-examples/

dir

it works in dos so why not linux command line!

man page seems almost identical to the ls command, i am guessing there is an old historical reason why it is in place

arch

from the man page

arch - print machine hardware name (same as uname -m)

It is a useful command to check the architecture (32 or 64 bit) of your system

a2p

from the man page

A2p takes an awk script specified on the command line (or from standard input) and produces a comparable perl script on the standard output.

example at
http://www.folkstalk.com/2011/12/converting-awk-script-to-perl-script.html

addpart

you can use it to tell the kernel about partitions on a device.

example

http://wiki.barebox.org/doku.php?id=commands:addpart

alternatives

from the man page

DESCRIPTION
alternatives creates, removes, maintains and displays information about the symbolic links comprising the alternatives system. The alternatives system is a reimplementation of the Debian alternatives system. It was rewritten primarily to remove the dependence on perl; it is intended to be a drop in replacement for Debian’s update-dependencies script. This man page is a slightly modified version of the man page from the Debian project.

It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time.For example, many systems have several text editors installed at once. This gives choice to the users of a system, allowing each to use a different editor, if desired, but makes it difficult for a program to make a good choice of editor to invoke if the user has not specified a particular preference.

The alternatives system aims to solve this problem. A generic name in the filesystem is shared by all files providing interchangeable functionality. The alternatives system and the system administrator together determine which actual file is referenced by this generic name. For example, if the text editors ed(1) and nvi(1) are both installed on the system, the alternatives system will cause the generic name /usr/bin/editor to refer to /usr/bin/nvi by default. The system administrator can override this and cause it to refer to /usr/bin/ed instead, and the alternatives system will not alter this setting until explicitly requested to do so.

The generic name is not a direct symbolic link to the selected alternative. Instead, it is a symbolic link to a name in the alternatives directory, which in turn is a symbolic link to the actual file referenced. This is done so that the system administrator’s changes can be confined within the /etc directory: the FHS (q.v.) gives reasons why this is a Good Thing.

When each package providing a file with a particular functionality is installed, changed or removed, alternatives is called to update information about that file in the alternatives system. alternatives is usually called from the %post or %pre scripts in RPM packages.

It is often useful for a number of alternatives to be synchronised, so that they are changed as a group; for example, when several versions of the vi(1) editor are installed, the man page referenced by /usr/share/man/man1/vi.1 should correspond to the executable referenced by /usr/bin/vi. alternatives handles this by means of master and slave links; when the master is changed, any associated slaves are changed too. A master link and its associated slaves make up a link group.

Each link group is, at any given time, in one of two modes: automatic or manual. When a group is in automatic mode, the alternatives system will automatically decide, as packages are installed and removed, whether and how to update the links. In manual mode, the alternatives system will not change the links; it will leave all the decisions to the system administrator.

Link groups are in automatic mode when they are first introduced to the system. If the system administrator makes changes to the system’s automatic settings, this will be noticed the next time alternatives is run on the changed link’s group, and the group will automatically be switched to manual mode.

Each alternative has a priority associated with it. When a link group is in automatic mode, the alternatives pointed to by members of the group will be those which have the highest priority.

When using the --config option, alternatives will list all of the choices for the link group of which given name is the master link. You will then be prompted for which of the choices to use for the link group. Once you make a change, the link group will no longer be in auto mode. You will need to use the --auto option in order to return to the automatic state.

more info

http://linux.about.com/library/cmd/blcmdl8_alternatives.htm

dc

dc is a caculator function (older than bc) aka desk calculator

ddate

from the man page ddate - converts Gregorian dates to Discordian dates

one of the more weird Linux commands

Most of you may be aware of date command. There is also a ddate command. It converts Gregorian dates to Discordian dates or Erisian calendar, which is an alternative calendar used by some adherents of Discordianism.

http://www.cyberciti.biz/tips/linux-unix-discordian-calendar-ddate-command.html

dd

dd from the man page

convert and copy a file
a very powerful command

useful pages
http://www.thegeekstuff.com/2010/10/dd-command-examples/
http://www.codecoffee.com/tipsforlinux/articles/036.html
https://linuxblog.info/creating-large-files/

deallocvt

deallocvt from the man page

deallocate unused virtual consoles

examples
https://bharathisubramanian.wordpress.com/2009/02/07/one-day-one-gnulinux-command-deallocvt/

debugfs

from the man page

debugfs - ext2/ext3 file system debugger

example of how to recover files http://www.cyberciti.biz/tips/linux-ext3-ext4-deleted-files-recovery-howto.html
https://github.com/chadversary/debugfs-tutorial

join

from the man page

join lines of two files on a common field

good examples of usage
http://www.computerhope.com/unix/ujoin.htm
http://how-to.linuxcareer.com/learning-linux-commands-join

ul

another rather odd command

from the man page

Ul reads the named files (or standard input if none are given) and translates occurrences of underscores to the sequence which indicates underlining for the terminal in use, as specified by the environment variable TERM. The terminfo database is read to determine the appropriate sequences for underlining. If the terminal is incapable of underlining, but is capable of a standout mode then that is used instead. If the terminal can overstrike, or handles underlining automatically, ul degenerates to cat(1). If the terminal cannot underline, underlining is ignored.

urlview

from the man page

urlview is a screen oriented program for extracting URLs from text files and displaying a menu from which you may launch a command to view a specific
item.

more reading at http://vertito.blogspot.co.uk/2007/09/urlview-url-and-email-extractor.html
o view
unexpand

from the man page

unexpand - convert spaces to tabs

for more reading see http://landoflinux.com/linux_expand_unexpand_command.html

unhide

A forensic tool

see https://linuxblog.info/check-open-ports/
also see unhide-tcp which has a lot more options

unhide-tcp is a forensic tool that identifies TCP/UDP ports that are listening but are not listed by /sbin/ss (or alternatively by /bin/netstat)
through brute forcing of all TCP/UDP ports available.

usleep

usleep - sleep some number of microseconds
as appose to sleep which by default is in seconds

utmpdump

to view binary log files i.e utmpdump /var/run/utmp
although command like last can also be used

more examples at
http://xmodulo.com/monitor-user-login-history-centos-utmpdump.html

lscpu

from the man page

lscpu - display information about the CPU architecture

lscpu gathers CPU architecture information from sysfs and /proc/cpuinfo. The command output can be optimized for parsing or for easy readability by
humans. The information includes, for example, the number of CPUs, threads, cores, sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also information about the CPU caches and cache sharing, family, model, bogoMIPS, byte order, and stepping.

It provides better info than dmidecode -t processor
for more hardware commands see https://linuxblog.info/system-hardware-basics/

disown

can remove a running job from a users queue
also note

The SIGHUP (Hangup) signal is used by your system on controlling terminal or death of controlling process. You can use SIGHUP to reload configuration files and open/close log files too. In other words if you logout from your terminal all running jobs will be terminated. To avoid this you can pass the -h option to disown command. This option mark each jobID so that SIGHUP is not sent to the job if the shell receives a SIGHUP.

example

$ vi 1234 &
[1] 26041
$ jobs
[1]+ Stopped vi 1234
$ ps -ef | grep 1234
user1 26041 25989 0 09:15 pts/0 00:00:00 vi 1234
user1 26044 25989 0 09:16 pts/0 00:00:00 grep 1234
$ disown
-bash: warning: deleting stopped job 1 with process group 26041
$ jobs
$ ps -ef | grep 1234
root 26041 25989 0 09:15 pts/0 00:00:00 vi 1234
root 26046 25989 0 09:16 pts/0 00:00:00 grep 1234

lots of great write up including
http://unix.stackexchange.com/questions/3886/difference-between-nohup-disown-and
http://serverfault.com/questions/24425/can-i-nohup-screen-an-already-started-process
http://www.serverwatch.com/tutorials/article.php/3935306/Detach-Processes-With-Disown-and-Nohup.htm
http://www.cyberciti.biz/faq/unix-linux-disown-command-examples-usage-syntax/

arp

arp - manipulate the system ARP cache

ARP is used to translate protocol addresses to hardware interface addresses. Modifying your ARP cache can change which interfaces handle specific requests. ARP cache entries may be marked with the following flags: C (complete), M (permanent), and P (publish)

The purpose of Address Resolution Protocol (ARP) is to find out the MAC address of a device in your Local Area Network (LAN), for the corresponding IP address, which network application is trying to communicate.

workflow of arp https://tournasdimitrios1.wordpress.com/2011/01/09/address-resolution-protocol-arp-for-linux-administrators/

timeout

from the man page

timeout - run a command with a time limit

i.e

$ date; timeout 10 sleep 20;date
Thu Jun 25 15:20:49 GMT 2015
Thu Jun 25 15:20:59 GMT 2015

patch

from the man page

patch - apply a diff file to an original

more reading at
http://www.thegeekstuff.com/2014/12/patch-command-examples/
http://www.cyberciti.biz/faq/appy-patch-file-using-patch-command/

clockdiff

from the man page

clockdiff - measure clock difference between hosts

example

get ntp server details from /etc/ntp.conf

clockdiff 0.centos.pool.ntp.org

badblocks

part of the suite to check the hardware on a machine,
note used wrongly and it can be very dangerous

badblocks - search a device for bad blocks

examples of usage

http://linuxpoison.blogspot.co.uk/2008/01/howto-check-disk-drive-for-errors-and.html
http://www.linuxtechi.com/check-hard-drive-for-bad-sector-linux/

clock/hwclock

from the man page

hwclock is a tool for accessing the Hardware Clock. You can display the current time, set the Hardware Clock to a specified time, set the Hardware Clock to the System Time, and set the System Time from the Hardware Clock.

The clock that is managed by Linux kernel is not the same as the hardware clock.
To the time from the linux kernel run the date command
The Hardware clock runs even when you shutdown your system.
The Hardware clock is also called as BIOS clock. You can change the date and time of the hardware clock from the BIOS.

hwclock --systohc
allow you to set the hardware clock to the same time as the system clock.

namei

from the man page

namei - follow a pathname until a terminal point is found

it is basically A command to follow pathnames

example

namei /root/notes
f: /root/notes
d /
d root
d notes

more info at http://tuxthink.blogspot.ro/2011/08/namei-command-to-follow-pathnames.html

nameif

from the man page

nameif - name network interfaces based on MAC addresses

Note This program is obsolete. For replacement check ip link.

ncat

from the man page
ncat - Concatenate and redirect sockets

part of the nmap suite of tools

netreport

from the man page
netreport - request notification of network interface changes
netreport tells the network management scripts to send a SIGIO signal to the process which called netreport when any network interface status changes occur.

nl

from the man page
number lines of files

very similar to cat -n sshworks.txt
although there are extra flags for nl if needed

nping

from the man page
nping - Network packet generation tool / ping utility

part of the nmap suite of tools

nslookup

from the man page
nslookup - query Internet name servers interactively

see https://linuxblog.info/troubleshooting-connection-issues-between-a-and-b/
http://www.thegeekstuff.com/2012/07/nslookup-examples/

getcap

from the man page
getcap - examine file capabilities

an alternative to SUID.

example http://www.andy-pearce.com/blog/posts/2013/Mar/file-capabilities-in-linux/

groupmems

from the man page
groupmems - administer members of a user´s primary group

The groupmems command allows a user to administer his/her own group membership list without the requirement of superuser privileges. The groupmems
utility is for systems that configure its users to be in their own name sake primary group (i.e., guest / guest).

Only the superuser, as administrator, can use groupmems to alter the memberships of other groups.

grpck

from the man page

The grpck command verifies the integrity of the groups information. It checks that all entries in /etc/group and /etc/gshadow have the proper format
and contain valid data. The user is prompted to delete entries that are improperly formatted or which have other uncorrectable errors.

gpgv

a stripped down version of gpg

hdparm

see https://linuxblog.info/benchmark-a-disk/

hostid

from the man page
print the numeric identifier for the current host

sometimes used as a unique id for software installation

hoststat

display sendmail stats , similar to mailstats

htcacheclean

from the man page
htcacheclean - Clean up the appache disk cache

more details at http://serverfault.com/questions/585793/htcacheclean-doesnt-seem-to-be-cleaning-the-cache

dash

another type of shell
It is a Unix and Linux shell which is much smaller than bash but still aiming at POSIX-compliancy.

more reading at
Dash http://www.cyberciti.biz/faq/debian-ubuntu-linux-binbash-vs-bindash-vs-binshshell/

view

part of the vi suite of tools

view
Start in read-only mode. You will be protected from writing the files. Can also be done with the "-R" argument.

view

part of the vi suite of tools

ex
Start in Ex mode. Go to Normal mode with the ":vi" command. Can also be done with the "-e" argument.

xargs

xargs (1) - build and execute command lines from standard input

from the man page xargs - build and execute command lines from standard input

sample usage

echo 1 2 3 4 | xargs echo
1 2 3 4

examples of xargs

https://linuxblog.info/worked-example-slow-speeds/
https://linuxblog.info/strace/
https://linuxblog.info/faq/#dsc
https://linuxblog.info/curl/
http://www.cyberciti.biz/faq/linux-unix-bsd-xargs-construct-argument-lists-utility/

xzegrep

xzegrep - also see zfgrep

part of the XZ Utils

from the man page

xzgrep invokes grep(1) on files which may be either uncompressed or compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are
passed directly to grep(1).

If no file is specified, then the standard input is decompressed if necessary and fed to grep(1). When reading from standard input, gzip(1) and
bzip2(1) compressed files are not supported.

If xzgrep is invoked as xzegrep or xzfgrep then egrep(1) or fgrep(1) is used instead of grep(1). The same applies to names lzgrep, lzegrep, and lzf-
grep, which are provided for backward compatibility with LZMA Utils.

xzfgrep

xzfgrep - see xzegrep

factor

from the man page

Print the prime factors of each specified integer NUMBER. If none are specified on the command line, read them from standard input.

i.e factor 21
21: 3 7

faillock

from the man page

faillock - Tool for displaying and modifying the authentication failure record files

The pam_faillock.so module maintains a list of failed authentication attempts per user during a specified interval and locks the account in case there
were more than deny consecutive failed authentications. It stores the failure records into per-user files in the tally directory.

The faillock command is an application which can be used to examine and modify the contents of the the tally files. It can display the recent failed
authentication attempts of the username or clear the tally files of all or individual usernames.

fgconsole

from the man page
fgconsole - print the number of the active VT. (virtual terminal)

find2perl

find2perl - translate find command lines to Perl code

example http://www.theunixschool.com/2012/07/find2perl-10-examples-to-find-files.html

findfs

man page
findfs - Find a filesystem by label or UUID

findfs will search the disks in the system looking for a filesystem which has a label matching label or a UUID equal to uuid. If the filesystem is
found, the device name for the filesystem will be printed on stdout.

example https://sysadmincorner.wordpress.com/2013/02/16/how-to-get-filesystem-details-using-uuid-or-filesystem-label/

fgrep

fgrep is the same as grep -F.

findmnt

from the man page
findmnt - find a filesystem

findmnt will list all mounted filesytems or search for a filesystem. The findmnt command is able to search in /etc/fstab, /etc/fstab.d, /etc/mtab or
/proc/self/mountinfo. If device or mountpoint is not given, all filesystems are shown.

The command prints all mounted filesystems in the tree-like format by default.

fixfiles

from the man page
fixfiles - fix file SELinux security contexts.

flock

from the man page
flock - Manage locks from shell scripts

example https://tobrunet.ch/2013/01/follow-up-bash-script-locking-with-flock/
http://unix.stackexchange.com/questions/184259/can-someone-explain-how-to-use-flock-and-file-descriptors-to-lock-a-file-and-wri

fold

from the man page
fold - wrap each input line to fit in specified width

example http://www.cyberciti.biz/tips/linux-unix-word-wrap-command.html

fsfreeze

from the man page
fsfreeze - suspend access to an filesystem (Linux Ext3/4, ReiserFS, JFS, XFS).

more reading https://rwmj.wordpress.com/tag/fsfreeze/

seq

from the man page
seq - print a sequence of numbers

i.e
seq 5
1
2
3
4
5

sg

from the man page
sg - execute command as different group ID

The sg command works similar to newgrp but accepts a command. The command will be executed with the /bin/sh shell. With most shells you may run sg
from, you need to enclose multi-word commands in quotes. Another difference between newgrp and sg is that some shells treat newgrp specially,
replacing themselves with a new instance of a shell that newgrp creates. This doesn´t happen with sg, so upon exit from a sg command you are returned
to your previous group ID.

shred

from the man page
shred - overwrite a file to hide its contents, and optionally delete it

more reading at https://www.howtoforge.com/how-to-securely-destroy-wipe-data-on-hard-drives-with-shred

shuf

from the man page
shuf - generate random permutations

example
shuf -e 3 5 6 7
7
6
3
5

size

from the man page
size - list section sizes and total size.

The GNU size utility lists the section sizes---and the total size---for each of the object or archive files objfile in its argument list. By default,
one line of output is generated for each object file or each module in an archive.

sleep

sleep - delay for a specified amount of time

example
date ; sleep 5 ;date
Sun Jul 12 18:58:56 GMT 2015
Sun Jul 12 18:59:01 GMT 2015

tzselect

see https://linuxblog.info/faq/#til

zipsplit

from the man page
zipsplit - split a zipfile into smaller zipfiles

zdump

from the man page
Dump a list of all known time zones or, if an argument is provided, a specific zone or list of zones. Include each zone's current time with its name.
see http://www.linuxquestions.org/questions/linux-newbie-8/using-zdump-to-verify-timezone-data-600185/

zegrep

zegrep is the same as grep -EZ

zfgrep

zfgrep is the same as grep -FZ

zic

time zone compiler see http://www.tutorialspoint.com/unix_commands/zic.htm

id

from the man page
id - print real and effective user and group IDs
Print user and group information for the specified USERNAME, or (when USERNAME omitted) for the current user.

ifcfg

from the man page
ifcfg - simplistic script which replaces ifconfig IP managment
This is a simplistic script replacing one option of ifconfig , namely, IP address management. It not only adds addresses, but also
carries out Duplicate Address Detection RFC-DHCP, sends unsolicited ARP to update the caches of other hosts sharing the interface,
adds some control routes and restarts Router Discovery when it is necessary.

I strongly recommend using it instead of ifconfig both on hosts and on routers.

ifrename

from the man page
ifrename - rename network interfaces based on various static criteria

Ifrename is a tool allowing you to assign a consistent name to each of your network interface.

By default, interface names are dynamic, and each network interface is assigned the first available name (eth0, eth1...). The
order network interfaces are created may vary. For built-in interfaces, the kernel boot time enumeration may vary. For removable
interface, the user may plug them in any order.

Ifrename allow the user to decide what name a network interface will have. Ifrename can use a variety of selectors to specify how
interface names match the network interfaces on the system, the most common selector is the interface MAC address.

Ifrename must be run before interfaces are brought up, which is why it’s mostly useful in various scripts (init, hotplug) but is
seldom used directly by the user. By default, ifrename renames all present system interfaces using mappings defined in /etc/iftab.

insmod

from the man page
insmod - simple program to insert a module into the Linux Kernel

Only the most general of error messages are reported: as the work of trying to link the module is now done inside the kernel, the
dmesg usually gives more information about errors.

also see modprobe(8), rmmod(8), lsmod(8)

installkernel

from the man page
installkernel - tool to script kernel installation

ipcalc

from the man page
ipcalc - perform simple manipulation of IP addresses

ipcalc provides a simple way to calculate IP information for a host. The various options specify what information ipcalc should
display on standard out. Multiple options may be specified. An IP address to operate on must always be specified. Most opera-
tions also require a netmask or a CIDR prefix as well.

i.e ipcalc -n 192.168.0.1/24
NETWORK=192.168.0.0

sipcalc seems a better subnet caculator

iw* commands

iw - show / manipulate wireless devices and their configuration
iwconfig - configure a wireless network interface
iwevent - Display Wireless Events generated by drivers and setting changes
iwgetid - Report ESSID, NWID or AP/Cell Address of wireless network
iwlist - Get more detailed wireless information from a wireless interface
iwpriv - configure optionals (private) parameters of a wireless network interface
iwspy - Get wireless statistics from specific nodes

mailq

running mailq which is the same as sendmail -bp prints a summary of the mail messages queued for future delivery.

also see http://www.tldp.org/LDP/nag2/x15691.html

mailstat

from the man page
mailstat - shows mail-arrival statistics

also see http://www.tldp.org/LDP/nag2/x15691.html
& hoststat

mailstats

from the man page

The mailstats utility displays the current mail statistics.

First, the time at which statistics started being kept is displayed, in the format specified by ctime(3). Then, the statistics for each mailer are displayed on a single line, each
with the following white space separated fields:

M The mailer number.
msgsfr Number of messages from the mailer.
bytes_from Kbytes from the mailer.
msgsto Number of messages to the mailer.
bytes_to Kbytes to the mailer.
msgsrej Number of messages rejected.
msgsdis Number of messages discarded.
msgsqur Number of messages quarantined.
Mailer The name of the mailer.

After this display, a line totaling the values for all of the mailers is displayed (preceded with a ‘‘T’’), separated from the previous information by a line containing only equals
(‘‘=’’) characters. Another line preceded with a ‘‘C’’ lists the number of TCP connections.

makewhatis

from the man page
makewhatis - Create the whatis database (i.e so the whatis command works)

makewhatis reads all the manual pages contained in the given sections of manpath or the preformatted pages contained in the given sections of catpath. For each page, it writes a
line in the whatis database; each line consists of the name of the page and a short description, separated by a dash. The description is extracted using the content of the NAME sec-
tion of the manual page.

man2html

from the man page
man2html - format a manual page in html

mbchk

from the man page
mbchk - check the format of a Multiboot kernel
Check if the format of FILE complies with the Multiboot Specification.

mkdict

These binaries are part of the cracklib-dicts RPM package, but no man pages are included in RPM package.
They Convert plain text files into format suitable for dictd. More about dictd: http://www.dict.org/

mountpoint

from the man page
mountpoint - see if a directory is a mountpoint

usage

mountpoint /var/
/var/ is a mountpoint
mountpoint /123/
/123/ is not a mountpoint

mpstat

from the man page
mpstat - Report processors related statistics.

similar output to sar

The mpstat command writes to standard output activities for each available processor, processor 0 being the first one. Global
average activities among all processors are also reported

mtr

from the man page

mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.

As mtr starts, it investigates the network connection between the host mtr runs on and HOSTNAME. by sending packets with purposly
low TTLs. It continues to send packets with low TTL, noting the response time of the intervening routers. This allows mtr to
print the response percentage and response times of the internet route to HOSTNAME. A sudden increase in packetloss or response
time is often an indication of a bad (or simply overloaded) link.

lchage

from the man page

lchage - Display or change user password policy
Displays or allows changing password policy of user.

lchfn

from the man page
lchfn - Change finger information

Displays and allows changing information about user that is available using the finger(1) command (usually stored in the "gecos"
field of /etc/passwd).

lchsh

from the man page
lchsh - Change login shell

ldd

to help with the shared libary managment

ldd (List Dynamic Dependencies) is a Unix and Linux program to display the shared libraries required by each program. This tools is required to build and run various server programs in a chroot jail. A typical example is as follows to list the Apache server shared libraries, enter:
# ldd /usr/sbin/httpd

more reading at
http://www.cyberciti.biz/tips/linux-shared-library-management.html

lnstat

from the man page
lnstat - unified linux network statistics

lnstat is a generalized and more feature-complete replacement for the old rtstat program. In addition to routing cache
statistics, it supports any kind of statistics the linux kernel exports via a file in /proc/net/stat/.

more reading at http://linuxadministrative.blogspot.ro/2014/08/lnstat-command-examples.html
lockfile

lockfile can be used in scripts to make sure only 1 instance of the script runs

from the manpage

lockfile can be used to create one or more semaphore files. If lockfile can’t create all the specified files (in the speci-
fied order), it waits sleeptime (defaults to 8) seconds and retries the last file that didn’t succeed. You can specify the
number of retries to do until failure is returned. If the number of retries is -1 (default, i.e., -r-1) lockfile will retry
forever.

see more at http://stackoverflow.com/questions/1715137/the-best-way-to-ensure-only-1-copy-of-bash-script-is-running

lokkit

The Lokkit utility attempts to provide firewalling for the average Linux end user. Instead of configuring firewall rules, Lokkit asks asmall number of simple questions and writes a firewall rule set for you. Lokkit is not designed to configure arbitrary firewalls. To make it simple to understand, it is solely designed to handle typical dialup user and cable modem setups. It will not provide a complex firewall configuration, and it is not the equal of an expert firewall designer.

look

from the man page

The look utility displays any lines in file which contain string as a prefix. As look performs a binary search, the lines in
file must be sorted (where sort(1) got the same options -d and/or -f that look is invoked with).

If file is not specified, the file /usr/share/dict/words is used, only alphanumeric characters are compared and the case of
alphabetic characters is ignored.

if you get the error look: /usr/share/dict/words: No such file or directory
you may need to install words

example

root@linuxblog:~ $ look rendez
rendezvous
rendezvoused
rendezvouses
rendezvousing

lsblk

from the man page

lsblk lists information about all or the specified block devices. The lsblk command reads the sysfs filesystem to gather
information.

The command prints all block devices (except RAM disks) in a tree-like format by default. Use lsblk --help to get a list of
all available columns.

i.e

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 251:0 0 130G 0 disk
└─vda1 251:1 0 130G 0 part /
....

lsinitrd

tool to show the contents of an initramfs image

taken fromhttp://www.linux-wizard.net/2009/05/27/listing-initrd-content-with-lsinitrd/

For example to list the content of the default initrd used to boot your system, just do the following command as root :
lsinitrd /boot/initrd.img

With lsinitrd, you will be able to see the list of modules included and thus loaded at boot, or the commands executed. This is especially useful for people needed specific modules not include automatically in the initrd by mkinitrd : they will be able to check if the right modules are icluded, or the right commands used. On a Mandriva cooker system using ext3 on standard partitions ( no LVM, no software RAID, no encryption ), this give the following output :

lslogins

quite a nice output

lslogins - display information about known users in the system

Examine the wtmp and btmp logs, /etc/shadow (if necessary) and /etc/passwd and output the desired data.

lsmod

from the man page
lsmod - program to show the status of modules in the Linux Kernel

lsmod is a trivial program which nicely formats the contents of the /proc/modules, showing what kernel modules are currently
loaded.

also see https://linuxblog.info/linux-forgotten-commands/#insmod
https://linuxblog.info/system-hardware-basics/

pidof

from the man page
pidof -- find the process ID of a running program.

i.e

pidof httpd
28775 25539 25538 25537 25470 25242 25241 25240 25239 25238 25237 25236 25235 22843 19780 13429 11506 6239

best used when mashing together commands

https://linuxblog.info/strace/#b
https://linuxblog.info/faq/#kdf

tac

the opposite of cat

i.e

cat 123.txt
1
2
3
tac 123.txt
3
2
1

tailf

from the man page

tailf - follow the growth of a log file

tailf will print out the last 10 lines of a file and then wait for the file to grow. It is similar to tail -f
but does not access the file when it is not growing. This has the side effect of not updating the access time
for the file, so a filesystem flush does not occur periodically when no log activity is happening.

tailf is extremely useful for monitoring log files on a laptop when logging is infrequent and the user desires
that the hard disk spin down to conserve battery life.

taskset

from the man page
taskset - retrieve or set a process’s CPU affinity

taskset is used to set or retrieve the CPU affinity of a running process given its PID or to launch a new COM-
MAND with a given CPU affinity. CPU affinity is a scheduler property that "bonds" a process to a given set of
CPUs on the system. The Linux scheduler will honor the given CPU affinity and the process will not run on any
other CPUs. Note that the Linux scheduler also supports natural CPU affinity: the scheduler attempts to keep
processes on the same CPU as long as practical for performance reasons. Therefore, forcing a specific CPU
affinity is useful only in certain applications.

The CPU affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU
and the highest order bit corresponding to the last logical CPU. Not all CPUs may exist on a given system but
a mask may specify more CPUs than are present. A retrieved mask will reflect only the bits that correspond to
CPUs physically on the system. If an invalid mask is given (i.e., one that corresponds to no valid CPUs on
the current system) an error is returned. The masks are typically given in hexadecimal. For example,

0x00000001
is processor #0

0x00000003
is processors #0 and #1

0xFFFFFFFF
is all processors (#0 through #31)

useful reading http://www.cyberciti.biz/tips/setting-processor-affinity-certain-task-or-process.html
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_MRG/1.3/html/Realtime_Reference_Guide/chap-Realtime_Reference_Guide-Affinity.html

test

from the man page
test - check file types and compare values

see http://wiki.bash-hackers.org/commands/classictesthttp://bash.cyberciti.biz/guide/Test_command

tload

from the man page
tload - graphic representation of system load average

see more at http://linoxide.com/monitoring-2/tload-command-displays-current-system-load-average-on-linux/

toe

can help you find the valid values for TERM variable (i.e echo $TERM)

from the man page
toe - table of (terminfo) entries

With no options, toe lists all available terminal types by primary name with descriptions. File arguments
specify the directories to be scanned; if no such arguments are given, your default terminfo directory is
scanned. If you also specify the -h option, a directory header will be issued as each directory is entered.

tracepath

from the man page
tracepath, tracepath6 - traces path to a network host discovering MTU along this path

explanation of the difference between tracepath and traceroute
http://askubuntu.com/questions/114264/what-are-the-significant-differences-between-tracepath-and-traceroute

true

from the man page
true - do nothing, successfully

example
while true; do something

truncate

from the man page
truncate - shrink or extend the size of a file to the specified size

tsort

from the man page
tsort - perform topological sort

example http://www.cyberciti.biz/faq/unix-linux-topological-sorting/
tty

from the man page
tty - print the file name of the terminal connected to standard input

readlink

from the man page
readlink - print value of a symbolic link or canonical file name

example usage at
http://linuxers.org/howto/how-use-readlink-command-find-canonical-filename-symbolic-link

paste

allows you to manipulate files

from the man page
paste - merge lines of files

-s option of paste joins all the lines in a file. Since no delimiter is specified, default delimiter tab is used to separate the columns.

see http://www.theunixschool.com/2012/07/10-examples-of-paste-command-usage-in.html for more examples

partx

from the man page
partx - telling the kernel about presence and numbering of on-disk partitions.

example usage https://access.redhat.com/solutions/57542

pidstat

from the man page
pidstat - Report statistics for Linux tasks.

part of the sysstat suite
It really allows you to use the sar commands against a single process rather than the system as a whole

examples at http://www.thegeekstuff.com/2014/11/pidstat-examples/

stat

from the man page
stat - display file or file system status

example usage
stat -c ‘%a %n’ * # shows files octal permission

more reading at https://www.ibm.com/developerworks/community/blogs/58e72888-6340-46ac-b488-d31aa4058e9c/entry/linux_stat_command_with_examples12?lang=en
and http://www.itworld.com/article/2694880/unix-stat-more-than-ls.html

sum

from the man page
sum - checksum and count the blocks in a file

A checksum is a number mathematically calculated from the contents of a file, for the purpose of checking its integrity. A script might refer to a list of checksums for security purposes, such as ensuring that the contents of key system files have not been altered or corrupted.

sys-unconfig

from the man page
sys-unconfig - shell script to reconfigure the system upon next boot

sys-unconfig provides a simple method of reconfiguring a system in a new environment. Upon executing sys-
unconfig will halt your system, and run the following configuration programs at boot: passwd (to change the
root password), netconfig, timeconfig, kbdconfig, authconfig, and ntsysv.

sushell

from the man page
sushell - execute the single-user shell

sushell is an implementation detail, required for proper SELinux usage. It is not intended to be run regularly.

sudoedit

from the man page
sudoedit - execute a command as another user

also see http://superuser.com/questions/785187/sudoedit-why-use-it-over-sudo-vi
and http://bencane.com/2012/02/26/sudoedit-securely-allow-users-to-edit-files/

sudoreplay

from the man page

sudoreplay - replay sudo session logs

sudoreplay plays back or lists the output logs created by sudo. When replaying, sudoreplay can play the session
back in real-time, or the playback speed may be adjusted (faster or slower) based on the command line options.

for setup details see http://askubuntu.com/questions/446079/how-to-make-sudoreplay-work

rev

from the man page
rev (1) - reverse lines of a file or files

also see cat and Tac

#cat test45
1 2 3
1a 2a 3a
#tac test45
1a 2a 3a
1 2 3
#rev test45
3 2 1
a3 a2 a1

or

echo "dlroW ,olleH" | rev
Hello, World

rename

from the man page
rename (1) - Rename files (v move)

For example, given the files
foo1, ..., foo9, foo10, ..., foo278, the commands

rename foo foo0 foo?
rename foo foo0 foo??

will turn them into foo001, ..., foo009, foo010, ..., foo278.

And
rename .htm .html *.htm
will fix the extension of your html files.

pinky

also see finger

from the man page

pinky (1) - lightweight finger

for examples see http://linuxadministrative.blogspot.ro/2014/09/pinky-command-examples.html

splain

from the man page
produce verbose warning diagnostics

see http://www.tutorialspoint.com/unix_commands/splain.htm
rvi

A symbolic link to `vi'

rtacct

from the man page
rtacct (8) - network statistics tools
nstat and rtacct are simple tools to monitor kernel snmp counters and network interface statistics.

replace

replace (1) - a string-replacement utility

The replace program is used by msql2mysql. See msql2mysql

While you can use if to replace contents of a file sed is the more common method

pkexec

from the man page
pkexec (1) - Execute a command as another user

There are two general ways to run applications graphically as root (or, more generally, as another user).
Programs like gksu, gksudo, and kdesudo are graphical frontends for sudo. In contrast, pkexec is a graphical frontend for PolicyKit.

more reading at
http://askubuntu.com/questions/78352/when-to-use-pkexec-vs-gksu-gksudo
http://www.quora.com/What-is-the-difference-between-pkexec-and-sudo

start

a symbolic link to initctl
see also stop & restart

from the man page

You may also create symbolic or hard links to initctl named after commands. When invoked through these links
the tool will behave only as that command, with global and command-specific options intermixed. The default
installation supplies such links for the start, stop, restart, reload and status commands.

stop

a symbolic link to initctl
see also start & restart
from the man page

You may also create symbolic or hard links to initctl named after commands. When invoked through these links
the tool will behave only as that command, with global and command-specific options intermixed. The default
installation supplies such links for the start, stop, restart, reload and status commands.

restart

a symbolic link to initctl
see also start & stop

from the man page

You may also create symbolic or hard links to initctl named after commands. When invoked through these links
the tool will behave only as that command, with global and command-specific options intermixed. The default
installation supplies such links for the start, stop, restart, reload and status commands.

sln

From the man page

The sln program creates symbolic links. Unlike the ln(1) program, it
is statically linked. This means that if for some reason the dynamic
linker is not working, sln can be used to make symbolic links to
dynamic libraries.

more reading http://www.ibm.com/developerworks/library/l-lpic1-v3-102-3/

ssltap

ssltap (1) - Tap into SSL connections and display the data going by

see http://www.virkki.com/jyri/articles/index.php/observing-ssl-requests/

pmap

from the man page
pmap (1) - report memory map of a process

Pmap provide memory map of a process, The pmap command display the memory usage map of a process or multiple processes. Pmap reports information about the address space or memory usage map of a process. Pmap is actually a Sun OS command and Linux supports only very limited number of features. But it is very helpful for finding the complete address space of a process. To check memory usage of process we need PID or unique process ID of running process, we can get PID from /proc or regular commands like top or ps.

basic usage
pmap 19714

more reading http://linoxide.com/linux-command/pmap-command/
https://techtalk.intersec.com/2013/07/memory-part-2-understanding-process-memory/
http://www.cyberciti.biz/tips/howto-find-memory-used-by-program.html

split

split (1) - split a file into pieces
by default there are 1000 lines per file

-a, --suffix-length=N
use suffixes of length N (default 2)

-b, --bytes=SIZE
put SIZE bytes per output file
usage

split -b 50GB test.gz
split -b 10 -a 10 /home/bigfile

see also http://linux.101hacks.com/unix/split/
http://www.thegeekstuff.com/2012/10/15-linux-split-and-join-command-examples-to-manage-large-files/
http://www.theunixschool.com/2012/10/10-examples-of-split-command-in-unix.html

sipcalc

sipcalc also see ipcalc

from the man page

Sipcalc is an ip subnet calculator consisting of two parts. A plain text based console version, and web (cgi)
based counterpart. This manpage only addresses the console based version. Sipcalc, in its simplest form
takes an ip-address and a subnet mask on the commandline and outputs information about the subnet. Sipcalc
has support for both IPv4 and IPv6 addresses.

Sipcalc can take input in three forms, an ip-address/netmask, an interface or via stdin using the special
character

usage
sipcalc 192.168.0.1/24
-[ipv4 : 192.168.0.1/24] - 0

[CIDR]
Host address - 192.168.0.1
Host address (decimal) - 3232235521
Host address (hex) - C0A80001
Network address - 192.168.0.0
Network mask - 255.255.255.0
Network mask (bits) - 24
Network mask (hex) - FFFFFF00
Broadcast address - 192.168.0.255
Cisco wildcard - 0.0.0.255
Addresses in network - 256
Network range - 192.168.0.0 - 192.168.0.255
Usable range - 192.168.0.1 - 192.168.0.254

pydoc

Pydoc is a documentation module for the programming language Python. Similar to the functionality of Perldoc within Perl, Pydoc allows Python programmers to access Python's documentation help files, generate HTML pages with documentation specifics, and find the appropriate module for a particular job

peekfd

from the man page
peekfd (1) - peek at file descriptors of running processes

rather worrying from the man page

BUGS
Probably lots. Don’t be surprised if the process you are monitoring dies.

example usage at http://kernhack.hatenablog.com/entry/20101013/1286984905

pethtool

from the man page
pethtool (8) - Display or change ethernet card settings

This script mimic ethtool behaviour, but is written purely in python and python module ethtool.

run-parts

run-parts - run scripts or programs in a directory

commonly used in /etc/crontab file. i.e
# run-parts
01 * * * * root run-parts /etc/cron.hourly

which would run every script that is found in this directory.

As you can see, in cron it's used for convenience, since you only have to specify one directory and everything in that directory will be executed.
This makes it easy to maintain scripts in one of the etc/cron* directories.

source

When a script is run using source it runs within the existing shell, any variables created or modified by the script will remain available after the script completes. In contrast if the script is run just as filename, then a separate subshell (with a completely separate set of variables) would be spawned to run the script.

so in basic terms

  • sourcing will run the commands in the current shell process.
  • executing will run the commands in a new shell process.
  • in scripting . is the same as source

an example of executing v source

# cat alias_test1
#! /bin/bash
alias t12='date'
#chmod 755 alias_test1
# ./alias_test1
# alias | grep t12
# source alias_test1
# alias | grep t12
alias t12='date'

so to reload your .bashrc following a change:

# slp1
-bash: slp1: command not found
# echo "alias slp1='date'" >> ~/.bashrc
# source ~/.bashrc
# slp1
Mon Jan  4 16:16:13 GMT 2016

more reading:

http://www.cyberciti.biz/faq/fedora-redhat-scientific-linuxenable-bash-completion/
http://bash.cyberciti.biz/guide/Source_command
http://superuser.com/questions/46139/what-does-source-do
http://superuser.com/questions/176783/what-is-the-difference-between-executing-a-bash-script-and-sourcing-a-bash-scrip/176788#176788

type

similar output to which

from the man page

type [-aftpP] name [name ...]
With no options, indicate how each name would be interpreted if used as a command name. If the -t option is used, type prints a string which is one of alias, keyword, function, builtin, or file if name is an alias, shell reserved word, function, builtin, or disk file, respectively. If the name is not found, then nothing is printed, and an exit status of false is returned. If the -p option is used, type either returns the name of the disk file that would be executed if name were specified as a command name, or nothing if ‘‘type -t name’’ would not return file. The -P option forces a PATH search for each name, even if ‘‘type -t name’’ would not return file. If a command is hashed, -p and -P print the hashed value, not necessarily the file that appears first in PATH. If the -a option is used, type prints all of the places that contain an executable named name. This includes aliases and functions, if and only if the -p option is not also used. The table of hashed commands is not consulted when using -a. The -f option suppresses shell function lookup, as with the command builtin. type returns true if all of the arguments are found, false if any are not found.

type -p ls
/bin/ls
type -t ls
file
type ls
ls is hashed (/bin/ls)

which mv
alias mv='mv -i'
/bin/mv
type mv
mv is aliased to `mv -i'
type -t mv
alias
type -p mv
type -a mv

mv is aliased to `mv -i'
mv is /bin/mv

http://bash.cyberciti.biz/guide/Type_command
route

from the man page

route - show / manipulate the IP routing table

also see https://linuxblog.info/gateway/
usage see http://www.thegeekstuff.com/2012/04/route-examples/
& http://www.cyberciti.biz/faq/linux-route-add/

rpm* commands

also see https://linuxblog.info/linux-basic-commands/#rpm

rpmdb - symbolic link to bin/rpm
rpmquery - symbolic link to bin/rpm
rpmsign - symbolic link to bin/rpm
rpmverify symbolic link to bin/rpm

rotatelogs

from the man page
rotatelogs (8) - Piped logging program to rotate Apache logs

rotatelogs is a simple program for use in conjunction with Apache’s piped logfile feature. It supports rotation based on a time interval or maximum size of the log.

Add this:
TransferLog "|rotatelogs /some/where 86400"
or:
TransferLog "|rotatelogs /some/where 5M"

to httpd.conf.

pathchk

from the man page
The pathchk command checks that one or more path names are valid and portable. By default, the pathchk command checks each component of each path name specified by the path name parameter based on the underlying file system. An error message is sent for each path name that meets the following criteria:

The byte length of the full path name is longer than allowed by the system.
The byte length of a component is longer than allowed by the system.
Search permission is not allowed for a component.
A character in any component is not valid in its containing directory.

It is not considered an error if one or more components of a path name do not exist, as long as a file matching the path name specified by the PathName parameter could be created that does not violate any of the above criteria.

more info at http://www-01.ibm.com/support/knowledgecenter/ssw_aix_53/com.ibm.aix.cmds/doc/aixcmds4/pathchk.htm?cp=ssw_aix_53%2F1-2-0-15-11

example

pathchk /adskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkj
pathchk: /adskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkj: File name too long

basename

from the man page
basename strip directory and suffix from filenames i.e basename /usr/bin/sort

EXAMPLES
basename /usr/bin/sort
Output "sort".

basename include/stdio.h .h
Output "stdio".

also see dirname

dirname

from the man page
dirname (1) - strip non-directory suffix from file name

EXAMPLES
dirname /usr/bin/sort
Output "/usr/bin".

dirname stdio.h
Output ".".

also see pathchk

dnsdomainname

dnsdomainname [hostname] (1) - show the system's DNS domain name

example

$ dnsdomainname
world.com
$ hostname
mymachine.world.com

sysrq

more reading at https://fedoraproject.org/wiki/QA/Sysrq

is a key combination understood by the Linux kernel, which allows the user to perform various low-level commands regardless of the system's state. It is often used to recover from freezes, or to reboot a computer without corrupting the filesystem

wget

more reading at http://www.tecmint.com/10-wget-command-examples-in-linux/

wget -i can read url from a file
when download large files add -c to allow it to resume downloading if the download was stopped (example at http://www.tecmint.com/10-wget-command-examples-in-linux/)
wget -b will allow the download to happen in the background
-–limit-rate=100k will allow you to restrict the download speeds
With Options –http-user=username, –http-password=password & –ftp-user=username, –ftp-password=password, you can download password restricted HTTP or FTP sites