UNIX: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 23: | Line 23: | ||
# mysqldump -h localhost -u username -ppassword dbname > \ | # mysqldump -h localhost -u username -ppassword dbname > \ | ||
/var/backups/dbname_`date +%F-%H%M%S`.sql | /var/backups/dbname_`date +%F-%H%M%S`.sql | ||
To give all users execute permissions to a file or set of files (by wildcard): | |||
# chmod a+x eg* | |||
Note: use -R to recursively apply to subdirectories. |
Revision as of 10:21, 6 April 2008
To rip a CD/DVD ISO image with dd:
$ dd if=/dev/cdrom of=~/my.iso bs=1024
To mount an ISO image on Solaris:
# mount -F hsfs -o ro `lofiadm -a /export/temp/software.iso` /mnt
To print the route table on Solaris/BSD:
# netstat -r
To get the number of seconds since 1970-01-01:
# date +%s
To get the date in the format yyyy-mm-dd-HHMMSS:
# date +%F-%H%M%S
To backup a MySql database:
# mysqldump -h localhost -u username -ppassword dbname > \ /var/backups/dbname_`date +%F-%H%M%S`.sql
To give all users execute permissions to a file or set of files (by wildcard):
# chmod a+x eg*
Note: use -R to recursively apply to subdirectories.