Loading....
Linux Commad Find (serach , change ,modfy, criteria ,recursive, file size)
ifconfig : print the network interface $ ifconfig | cut -c-10 | tr -d ' ' | tr -s '\n' grep ing ip address $ ifconfig wlan0 | egrep -o "inet addr:[^ ]*" | grep -o "[0-9.]*" 192.168.0.82 host muslum21.com nslookup muslum21.com
Scheduling
* * * * * /bin/execute/this/script.sh
* * * * * |
|
|
|
@reboot Run once, at startup @yearly Run once a year "0 0 1 1 *" @annually (same as @yearly) @monthly Run once a month "0 0 1 * *" @weekly Run once a week "0 0 * * 0" @daily Run once a day "0 0 * * *" @midnight (same as @daily) @hourly Run once an hour "0 * * * *" Leaving the rest of the fields empty, this would be valid: @daily /bin/execute/this/script.sh
mksquashfs : file system
backup options :
Creating a file size 1Mb $ dd if=/dev/zero of=junk.data bs=1M count=1 1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.00767266 s, 137 MB/s intersection and set differances (A-B) on text files commands : sort comm $ comm A.txt B.txt -1 -3 -2 -3 removes the second and third columns finding and deleting dublicate files by comparing files content example script exist in pdf or web awk {} used working with file permission, ownership and the stiky bit chmod used to modify the permission chown used to change the ownership of the file -R option to apply cmd recursively The sticky bit is an interesting type of permission applied to directories. By setting the sticky bit, it restricts only the user owning it to delete the files even though group and others may have sufficient permissions. In order to set the sticky bit, +t is applied on a directory with chmod as follows: $ chmod a+t directory_name Making File immutable when a file is immutable that means any user cannot remove it /etc/mtab immutable a way of securing the file such as /etc/resolv.conf command : # chattr +i file or -i Using loopback files command : mount -o loop, dd, $ dd if=/dev/zero of=muslum21.img bs=1G count=1 $mkfs.ext4 muslum21.img $file muslum21.img ## to test file information approval then mount to any folder create a folder mkdir muslum_folder $ mount -o loop muslum21.img muslum_folder now your storage is ready. Creating iso files and hybrid iso # cat /dev/cdrom > image.iso or # dd if=/dev/cdrom of=image.iso $ mkisofs -V "Label" -o image.iso source_dir/ hybrid iso is for usb storage devices with command isohybrid it can be Finding differences between files and patching command: diff, diff -u, patch -naur for applying patches. head and tail command : first 10 lines and last 10 lines . You will probably want to use this on logfiles. The command to monitor the growth of the files would be: # tail -f /var/log/messages
yum -y update --skip-broken
the command will skip broken packages with er. so there would not be error and continue working system. then you can try again same command to update the packages without er. and updated system. bye bye..