Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
Is there any way to know when a crontab was installed on ubuntu server?
Thanks
You can list user's cron tabs:
sudo ls -l /var/spool/cron/crontabs
To see when those files were last changed.
Also, you could read your logs (/var/log/syslog) and search for crontab keyword.
On a default installation of a cron job using crontab -e, the cron get logged in var/log/syslog file.
You can see when a cron job was was installed from that file by running:
grep "END EDIT" /var/log/syslog
The date and time is firt on the line.
Source: https://askubuntu.com/a/56811/147044
try crontab -e . Add 0 0/5 * * * /your/path/to/script/
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 12 months ago.
Improve this question
On Ubuntu, I installed Atom from the .deb package. But I mistakenly run it as root on the first time.
Then I get this error:
$ atom
$ /usr/bin/atom: line 185: /home/fabien/.atom/nohup.out: Permission denied
A ~/.atom directory has been created with the root privileges.
It can be solved:
by changing the ~/.atom owner:
sudo chown -R -v <username> ~/.atom
by simply removing this directory:
sudo rm -fr ~/.atom
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Its my first time working with cygwin so bear with me please.
I need to install a processing library via cygwin in order for it to work.
I followed all the steps in this tutorial and in the last step (00:22 seconds mark) I need to "cp" LeapMotion to the directory where Processing stores it's librarys.
I store mine in "D:\Processing Sketches\libraries" and i don't know how to copy it there. I'm confused with the ~/home/ part.
I tried "$ cp -R LeapMotion /D:/Processing\ Sketches/libraries/" but that doesnt work :/
Under cygwin DOS drive letters are mapped to /cygdrive/<drive>, so you would do it like this:
$ cp -R LeapMotion /cygdrive/d/Processing\ Sketches/libraries/
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
The postfix alias looks like this:
%omitted%: "|/var/www/rails/redmine/extra/mail_handler/rdm-mailhandler.rb --url %omitted% --key %omitted%"
The bounce message returned says
"Command died with status 127"
and
"Command output: /usr/bin/env: ruby: No such file or directory"
I ran
sudo -u postfix /usr/bin/env ruby -v
and it returned
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2009.10
So I assume the postfix user has ruby in its path.
I changed the shebang to /usr/local/bin/ruby and it works but I would prefer to have the code match the svn for the project I checked out.
Postfix manual local(8) says about pipe aliases:
The PATH environment variable is
always reset to a system-dependent
default path
It seems that /usr/local/bin/ is only in PATH when running interactive shell. You could tweak the PATH environment variable in your OS, but I think it's better to just change the alias to something like:
%omitted%: "|/usr/local/bin/ruby /var/www/rails/redmine/...
When you execute the command via sudo you still have your own environment, therefore your own path. Postfix's local program resets the PATH to a minimum (probably /bin and /usr/bin) when invoking an external program. You can use export_environment config parameter to set a different path. More information
So I assume the postfix user has ruby in its path.
No, it means that the user you issued the sudo with has ruby in its path. A simple sudo doesn't change the $PATH.
The simplest solution for your issue probably would be to just prepend the actual ruby to your script call, something like the following (assuming your ruby lives in /usr/bin/ruby).
%omitted%: "|/usr/bin/ruby /var/www/rails/redmine/extra/mail_handler/rdm-mailhandler.rb --url %omitted% --key %omitted%"
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Im using KUbuntu 10.04 (Lucid Lynx). I have installed zsh and screen. I have set zsh as the default shell, by setting Command to zsh in Settings->Edit Current Profile of the terminal.
But,when i launch screen,the bash shell is loaded. If i run the command zsh, then zsh starts but the following message is displayed:
"/home/joel/.zshrc:36: Can't add module parameter `mapfile': parameter already exists"
Also,zsh is invoked for only the current screen instance and i have to invoke it manually again for other instances.
So,is there any way to make screen load zsh by default and invoke it automatically for every instance ?
Thank You
If you want to make it the default shell for screen sessions only, you can simply add this line to your ~/.screenrc file.
shell "/usr/bin/zsh"
First locate where is zsh like that:
$ whereis zsh
Second change shell for current user:
$ chsh -s /path/to/zsh joel
And zsh will be default shell for user joel after relogin.
I had a similar problem to you, except in my case I changed the shell vim uses, by specifying set shell=zsh\ --login in .vimrc. Every time I dropped into a shell via :sh zsh would whine with the same error:
Can't add module parameter `mapfile': parameter already exists
I asked on #vim and #zsh on freenode. Turns out if you run zsh again within a zsh session, you'll see the same error, and the suggested fix is to simply append &>/dev/null to your .zshrc file like so:
zmodload -ap zsh/mapfile mapfile &>/dev/null
The zsh mapfile module creates a pseudo-variable which maps filenames to their contents, and is only needed if you have scripts that actually use $mapfile.
It appears to be optional, but it was pointed out that the autoload parameter is there so it only gets loaded when required, so there should be no harm in keeping the line and piping complaints to /dev/null
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have just, in my groggy morning state, reversed & confused the arguments to ln, replacing /usr/share/zoneinfo/America/Toronto with a link to the non-existant /etc/localtime, when I really wanted to link /etc/localtime to Toronto. Now I have no timezone file for where I live. Does anybody have a copy or know where I could get one? It's just instructions on how to translate unix time into toronto time, but I cat'd a few of the other files, and they don't seem like something I'm up to the task of writing by hand.
I know. At least I've never rm -r'd my /
edit:
Before anybody asks, I just tried sudo dpkg-reconfigure tzdata, gleefully entered "America" then "Toronto", only to crash and read, cp: cannot stat '/usr/share/zoneinfo/America/Toronto': no such file or directory. ARGH.
apt-get install --reinstall tzdata
Depending on which GNU/Linux distro you're using, you may be able to just re-download the whole of the tzdata package using its package manager. I know ArchLinux has a package for the time zone data and so does Debian.
However, you can also manually download the whole package and extract the time zone file that you want.
http://www.246tnt.com/files/Toronto