Command |
Description |
# sdiff file1 file2 |
find differences between two files and merge interactively alike "diff" [man] |
# sed 's/string1/string2/g' example.txt |
replace "string1" with "string2" in example.txt [man] |
# sed '/^$/d' example.txt |
remove all blank lines from example.txt [man] |
# sed '/ *#/d; /^$/d' example.txt |
remove comments and blank lines from example.txt [man] |
# sed -e '1d' exampe.txt |
eliminates the first line from file example.txt [man] |
# sed -n '/string1/p' |
view only lines that contain the word "string1" [man] |
# sed -e 's/ *$//' example.txt |
remove empty characters at the end of each row [man] |
# sed -e 's/string1//g' example.txt |
remove only the word "string1" from text and leave intact all [man] |
# sed -n '1,5p' example.txt |
print from 1th to 5th row of example.txt [man] |
# sed -n '5p;5q' example.txt |
print row number 5 of example.txt [man] |
# sed -e 's/00*/0/g' example.txt |
replace more zeros with a single zero [man] |
# shutdown -h now |
shutdown system(1) [man] |
# shutdown -h 16:30 & |
planned shutdown of the system [man] |
# shutdown -c |
cancel a planned shutdown of the system [man] |
# shutdown -r now |
reboot(1) [man] |
# smartctl -A /dev/hda |
monitoring reliability of a hard-disk through SMART [man] |
# smartctl -i /dev/hda |
check if SMART is active on a hard-disk [man] |
# smbclient -L ip_addr/hostname |
show remote shares of a windows host [man] |
# smbget -Rr smb://ip_addr/share |
like wget can download files from a host windows via smb [man] |
# sort file1 file2 |
sort contents of two files [man] |
# sort file1 file2 | uniq |
sort contents of two files omitting lines repeated [man] |
# sort file1 file2 | uniq -u |
sort contents of two files by viewing only unique line [man] |
# sort file1 file2 | uniq -d |
sort contents of two files by viewing only duplicate line [man] |
# strace -c ls >/dev/null |
display system calls made and received by a process [man] |
# strace -f -e open ls >/dev/null |
display library calls [man] |
# swapon /dev/hda3 |
activating a new swap partition [man] |
# swapon /dev/hda2 /dev/hdb3 |
activate two swap partitions [man] |