list contents of directories in a tree-like format
ex. tree -d -L3list contents of directories. it only displays directories. the display depth is 3.
get base name of path
ex. basename /home/wildlarva/mytext.txt
=> mytext.txt
ex. basename /home/wildlarva/mytext.txt .txt
=> mytextget directory of path
ex. dirname /home/wildlarva/mytext.txt
=> /home/wildlarvadisplay value of a symbolic link it can be also used for displaying absolute path
ex. readlink -f somefileoutput absolute path of somefile
trace a pathname until a terminal point is found
ex. namei ~/Practices/C/hello/a.exenamei outputs results like below
f: /home/wildlarva/Practices/C/hello/a.exe
d /
d home
d wildlarva
l Practices -> /cygdrive/d/Practices/
d /
d cygdrive
d d
d Practices
d C
d hello
- a.exerename multiple files
ex. mmv "*.txt" "#1.csv"change extension of all .txt files in current directory to .csv.
list open files
ex. lsof -c zshlist open files opened by zsh.
top-like I/O monitor
clear screen
get some sections from each line of files
ex. cut /etc/group -d ':' -f1,3get group names and ids of /etc/group
build and execute command lines from standard input TODO
output the last part of files
ex. tail -f somefileoutput appended data as the file grows.
sort lines of text files
ex. sort -nk3 somefilesort lines of somefile (compare field 3 as numeric value)
omit repeated lines
ex. sort -nk1 somefile | uniqomit repeated lines of somefile
output stdin to both of files and stdout
print a sequence of numbers
ex. seq 14print 1..14
ex. seq 20 10 100print 20,30,40,..,100
print line, word, byte counts
ex. wc -l filea filebprint line counts of filea and fileb
performance util
ex. time lsoutput ls execution time
print date
ex. date +%Y%m%dprint text including year, month and day
print system information
ex. uname -aprint all information
ex. uname -mprint architecture name (same as arch)
ex. uname -nprint host name (same as hostname)
displays information about elf files
ex. readelf -sshow symbol table
ex. readelf -Sshow section headers
ex. readelf -lshow segments
ex. readelf -hshow file header
displays information from object files
ex. objdump -Srl someprgshow assembly and relocation information
list symbols from object files TODO: