≡ Menu

date command

Append Current Date To Filename in Bash Shell

How do I append current date (mm_dd_yyyy format) to a filename (e.g., backup_mm_dd_yyyy.sql) under UNIX like operating systems?
[click to continue…]

The rndc stats commands created /var/named/chroot/var/named/data/named_stats.txt file under RHEL 5.x or CentOS 5.x BIND 9 server. However, date is not is correct format. The date is in the following format:
grep 'Dump' /var/named/chroot/var/named/data/named_stats.txt
outputs:

+++ Statistics Dump +++ (1263408025)
--- Statistics Dump --- (1263408025)
+++ Statistics Dump +++ (1263408071)
--- Statistics Dump --- (1263408071)
+++ Statistics Dump +++ (1268304218)
--- Statistics Dump --- (1268304218)
+++ Statistics Dump +++ (1268304248)
--- Statistics Dump --- (1268304248)

How do I convert date (e.g., 1263408025) in a human readable format?
[click to continue…]

Bash: Display Current Date

How do I display the current date under Bash UNIX / Linux / OS X shell?
[click to continue…]

HowTo: Get Current Time In Shell Script

How do I get the current server time in shell script on Linux or Unix-like operating systems? How do I store the current time in the shell variable and use in my scripts?
[click to continue…]

UNIX Date Command Examples

How do I view and set date under UNIX operating systems? How do I see the current time/date on Unix based server?
[click to continue…]

Display Date And Time In Linux

How do I display date and time in Linux using command line and GUI options?
[click to continue…]

Q. How do I find out file last modification time using a shell script or command? How do I delete or take any other custom action for all files more than one hour old in /home/ftp/incoming/raw/ directory?
[click to continue…]