2

I want to grep lines with date and time stamp. I came across this command called

dategrep

on internet. I am trying to install this on my 64 bit Ubuntu system. I downloaded a Debian package from http://packages.ubuntu.com/trusty/amd64/dateutils/download. I used

sudo dpkg -i package_name.deb 

to install it. But it don't seem to be present on my system when I use

which dategrep 

command to find it. Can anyone tell me how to get through this. Thank you

2

Use dpkg -L dateutils to find out what has been installed.

In specific, you should look for binaries in /bin, /sbin etc.

  • Yes. AND If the ubuntu package mentioned by the OP is the same as the debian package on my system, then dategrep is installed as /usr/bin/dateutils.dgrep. All of the executables (and their man pages) in that package are dateutils.?????- I would guess that when dateutils was packaged, there was at least one conflict with binaries in some other package, so the decision was made to rename the dateutils binaries by prefixing them with dateutils.. – cas Apr 8 '16 at 6:23
1

A simple search reveals that the package is maintained on github, but the installation procedure suggested there is incomplete and contains assumptions. Use the following commands:

release=0.54
wget https://github.com/mdom/dategrep/releases/download/$release/dategrep-standalone-big
sudo cp dategrep-standalone-big /usr/local/bin/dategrep
sudo chmod 755 /usr/local/bin/dategrep

0.54 is current version as of today, for future versions you need to change the first line.

  • I tried this one. I get http 404 error. Do i need to make any changes in that code. And this github is totally new for me. Can you guide me please. – Swatesh Pakhare Apr 8 '16 at 2:43
  • When I ran wget, a file called dategrep-standalone-big was generated. When I changed its extension to .pl, and run the cp command, I get error like this cp: cannot create regular file ‘/home/swatesh/bin/dategrep’: No such file or directory. What's going wrong here. Even if I don't add .pl extension I get same error. – Swatesh Pakhare Apr 8 '16 at 3:14
  • I got it. I logged in as root and used the same commands before edits. Like this root@ubuntu:/home/swatesh# cp dategrep-standalone-big /bin/dategrep and chmod +x /bin/dategrep. – Swatesh Pakhare Apr 8 '16 at 3:33
  • Yes, the effect will be the same. Good for you! – techraf Apr 8 '16 at 3:47
  • Regarding GitHub, it's a huge repository of open source projects. It is quite powerful for collaboration, but as a casual user you just need to know that each project has (should have) readme page with further instructions. There are also wikis and issue tracking parts which you may use to get information from. If information about a project is scarce it means it is badly maintained. – techraf Apr 8 '16 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.