Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-15-2014, 11:14 PM
|
#1
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Rep:
|
The date command.
Code:
semoi@server:~/Downloads/nvidia$ date 05160115
date: extra operand '05160115'
Try 'date --help' for more information.
semoi@server:~/Downloads/nvidia$
What am I doing wrong?
|
|
|
05-15-2014, 11:45 PM
|
#2
|
Senior Member
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Rep: 
|
Are you trying to set the date to May 16 0115 or is 0115 a time reference?
Last edited by dijetlo; 05-15-2014 at 11:59 PM.
Reason: I answered my own question
|
|
|
05-16-2014, 12:10 AM
|
#3
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
I appended a note to my post but it must have done something wrong because I don't see there now. I had previously made an alias of 'date' and the system was taking the alias instead of the real command.
|
|
|
05-16-2014, 04:32 AM
|
#4
|
Senior Member
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Rep: 
|
You know, oddly enough you're the second person this week to ask me why aliasing a shell built in with the name of a shell built in is giving you unexpected output.
I know technically you should be able to do it, the aliases load after the shell so the alias should supersede the built-in...what was your alias for date? If it was built on "date"
Code:
alias date ='date -?'
it may have worked, however the underlying utility, once accessed, is just throwing a familiar error.
Last edited by dijetlo; 05-16-2014 at 04:41 AM.
Reason: Non responsive
|
|
|
05-16-2014, 09:27 AM
|
#5
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep: 
|
works on Ubuntu 12.04.4 and Ubuntu 9.04 and CentOS 5.10 also
and spits out
Code:
Fri May 16 01:15:00 PDT 2014
on those.
Slackware 14, not so much:
Code:
date: cannot set date: Operation not permitted
Fri May 16 01:15:00 EDT 2014
It all depends on what the intent is, and the OS, of course.
maybe there's an alias for date already set?
try and if that 'works' as expected, then
will show you what's been set for it, if exists.
Last edited by Habitual; 05-16-2014 at 09:28 AM.
|
|
1 members found this post helpful.
|
05-16-2014, 09:58 AM
|
#6
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,968
|
Quote:
Originally Posted by stf92
I appended a note to my post but it must have done something wrong because I don't see there now. I had previously made an alias of 'date' and the system was taking the alias instead of the real command.
|
Glad you got it resolved. I thought the use of date was correct, and the fact that there was an alias explains it. Can you please mark the thread as solved.
|
|
|
05-16-2014, 05:38 PM
|
#7
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep: 
|
I power post too much.
Anyway the "\" escapes any alias if there is one.
also works, same as alias <alias> to 'see' what's what.
|
|
|
All times are GMT -5. The time now is 12:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|