adding the date into a file name

Adding the date into a file name helps record system information or provides a backup based on date. Using the year first allows for easier sorts when you have several files with the same name. This command: ifconfig -a > network.`date +'%Y_%m_%d'`.txt produces this: network.2014_07_23.txt This command: ifconfig -a > `date +'%Y_%m_%d'`-network.txt produces this: 2014_07_23-network.txt --> more 2014_12_23-network.txt lan0 Link encap:Ethernet HWaddr 11:11:11:11:11:11 inet addr:11.111.11.111 Bcast:11.111.11.111 Mask:111.111.111.111 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:58541560 errors:0 dropped:0 overruns:0 frame:0 TX packets:55809888 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:46141382968 (44003.8 Mb) TX bytes:55666523858 (53087.7 Mb) Interrupt:16 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:196167 errors:0 dropped:0 overruns:0 frame:0 TX packets:196167 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:16439051 (15.6 Mb) TX bytes:16439051 (15.6 Mb) You could create backup copies manually by typing: cp /etc/passwd `date +'%Y_%m_%d'`-etc-passwd.txt output: 2014_12_23-etc-passwd.txt cp /etc/group `date +'%Y_%m_%d'`-etc-group.txt output: 2014_12_23-etc-group.txt cp /etc/hosts `date +'%Y_%m_%d'`-etc-hosts.txt output: 2014_12_23-etc-hosts.txt A script could be written to backup a list of files and it could be run periodically via a cronttab.

ebook:
Full Size
Jeep Buyer's
Guide
ebook:
Practical Suggestions
for Microsoft
Windows
Linux Tackles Microsoft
12 hour Video Course by john:
The Art of Linux System Administration
published by O'Reilly Media
Study Guide for the LPIC-2 Certification Exams
search for:
on the internet, or:
JohnMeister.com-fotos
LinuxMeister-Linux
BibleTech-
Bible overview


An overview of Biblical history:
"Promises and Prophets"

Wagoneers

FULL SIZE JEEPS

JeepMeister
"Jeep is America's
only real sports car."
-Enzo Ferrari


MeisterTech
Diesels +

One Page Overview of Linux Commands

click for an image of the 5 essential Linux commands

An Intro to Linux
AMSOIL product guide,
or, AMSOIL web, or 1-800-956-5695,
use customer #283461

Amsoil dealer since 1983
purchase AMSOIL
at Midway Auto on SR9 in Snohomish,
or at Northland Diesel in Bellingham, WA


SJ - 1962-1991

XJ - 1984-2001

WJ - 1999-2004

KJ - 2002-2007

WK - 2005-2010

Find the recommended
AMSOIL synthetics
for your Jeep

CJ-10A - 1984-1986

Jeepsters

MJ - 1984-1992

Willys - 1946-1965

Other Jeeps (FC)