ls & rm with regular expression
e.g. rm -rf backup-20070[8-9]-*
would delete :
- backup-200708-morning
- backup-200708-evening
- backup-200709-night
- backup-200709-latenight
but not :
- backup-200706-morning
- backup-200707-afternoon
- backup-200711-midnight
e.g. ls backup-20070[1-9] would list all backup starting from January to September but leave October, November & December out, of year 2007.
Related posts:
- Regular Expression Cheat Sheet for you out there always trying to grep, ls, vi...
- useful unix command: xargs In our mailserver, we backup every incoming email and keep...
- How to dig SRV record after creating it in DNS dig <record type> <host.name> e.g dig SRV _someservice._port.hostname.domainame.com.my OR dig...
- FreeBSD New Web Interface Wow.. FreeBSD new interface layout is clean and nice. The...
- split – but no destination parameter to specify first : cd /destination/directory second : split /source/directory/big-huge-file prefix-to-apply-onto-splited-files Voila...
- convert epoch using date command date -d ‘<Unix epoch> <epoch date> sec’ e.g. date -d...
- Servers Uptime. More Than 356 days, 1 Year Old Phew, time flies… I’ve been working with AIMS for more...
- Maxis Online billing … gone Maxis online billing out of service. ...
- Oracle ...
- How to Install FreeBSD 5.4 on Your Machine FreeBSD is an advanced operating system for x86 compatible (including...