Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Changing the date in terminal

Posted on 2002-03-17
3
646 Views
Last Modified: 2006-11-17
Hi folks, I would like to be able to change the date in a terminal window instead of the gui.
I have tried some of the commands but can't seem to get it to work.
%D Date 11/13/55
Is what I have tried plus a few variations.
Any help, greatly appreciated.
Ned
0
Comment
Question by:Ned_Kelly
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
hindmost earned 25 total points
ID: 6873866
use date with the -s option
to set the date to 17th of march 2002 you would...
date -s 03182002

the format for the string used is MMDDCCYY
Wher M=Month D=Day in Month C=Century Y=Year. (Century is optional. You can add Hour and minute figures to the string as well.

This will only work if you have the appropriate priveleges to set the system clock. Otherwise you'll get an operation not permitted error.
0
 
LVL 2

Expert Comment

by:hindmost
ID: 6873874
Actually that example will set the date to the 18th of march. but all the rest of the info is correct <g>
0
 

Author Comment

by:Ned_Kelly
ID: 6873885
Thanks hindmost, thats great.
Appreciated very much.
Have a great day and regards Ned
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux redhat 7.2 10 88
fedora linux on laptop - setup sendmail - or some kind of email 5 54
maybe no no httpd.conf 6 61
Linux mount of Windows Shared Now Fails 8 73
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question