From the course: Linux Bash Shells and Scripts: Streamlining Tasks and Enhancing Workflows with Automation
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Date and time commands - Linux Tutorial
From the course: Linux Bash Shells and Scripts: Streamlining Tasks and Enhancing Workflows with Automation
Date and time commands
- [Instructor] So let's look at some fundamental commands having to do with time, including the date command that not only tells you the date but tells you the time. And you can find out how long something takes by gettin' the date and time doing it, and gettin' the date and time again. But there's more convenient, more accurate ways of timing how long things take. And also on Linux, you can find out how much time a program has already taken, and you can find out about other resource usages of a program, of a process. The date command has a few options. Basically, it's for printing the current date and time, but you can specify with different sort of syntax what date you want, like it understands the word tomorrow, or you can say -90days from now. Or you could do some fancy arithmetic with some Bash syntax we'll talk about later to calculate how many minutes from now you're interested in. And there's actually an international standard for date formats, you can use the capital I option…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Exploring the Bash documentation2m 27s
-
(Locked)
Setting the script interpreter and permissions5m 49s
-
(Locked)
Date and time commands5m 36s
-
(Locked)
Shell variables4m 28s
-
(Locked)
Bash startup2m 52s
-
(Locked)
Sourcing and aliasing with Bash3m 31s
-
(Locked)
Displaying text with the echo command4m 12s
-
(Locked)
Challenge: Exported variables, sourcing, and echo2m 17s
-
(Locked)
Solution: Exported variables, sourcing, and echo4m 7s
-
-
-
-
-