With arp command you can find out what mac address any host in your lan has.
bash |copy code |?
1 > arp 192.168.0.122 3 4 Address HWtype HWaddress Flags Mask Iface
With arp command you can find out what mac address any host in your lan has.
bash |copy code |?
1 > arp 192.168.0.122 3 4 Address HWtype HWaddress Flags Mask Iface
Use dpkg-reconfigure to change time zone on Debian
192.168.0.12 ether 00:0F:AE:34:03:07 C eth0
Quick command to dump all tables matching a like pattern. In the example drop tables option is added with xargs.
bash |copy code |?
1 dpkg-reconfigure tzdata
How to batch resize images in linux with imagemagick
bash |copy code |?
1 mysql $DB -u$USERNAME -p$PASSWORD -e 'show tables like "$LIKE%"' | grep -v Tables_in | xargs mysqldump --add-drop-table $DB -u$USERNAME -p$PASSWORD
Show default gateway in linux with ip command.
bash |copy code |?
1 for image in *.jpg; do convert "$image" -resize 250x250 "thumb.$image"; done
You should run this command within a script!
bash |copy code |?
1 ip route show | grep default | awk '{ print $3}'
Search for directories that don’t contain a file we set in options.樂威壯
In our case are .vmx files.
bash |copy code |?
1 abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"2 bash |copy code |?
1 find /vmfs/volumes/v02tstn02a01/ -type d | while3 read dir; do if [ ! -f $dir/*.vmx ]; then
Limit of descriptors per process on the fly
You can set limits for process such as open files making changes in /etc/security/limits.conf. If you want this file to be re-read you have to reboot the system. But with this command you can set limits on the fly.
echo $dir; fi; done;2 bash |copy code |?
1 How to generate a tar gz file from a file list
Easy example of tar use. We provide a list of files to archive them in one tar file.
tar zcvf myFile.tar.gz file1.txt file2.txt file3.txt file4.txt <樂威壯
/code>List large files in Linux
Command to find and list all files above a defined size. Works for debian based distros and Centos. If the output its wrong in other systems, you can play with awk params.
ulimit -n