LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2013, 04:59 AM   #1
enoch
LQ Newbie
 
Registered: Aug 2013
Posts: 1

Rep: Reputation: Disabled
grep command line


I want to grep a file to see all the transactions that were done at the 14th hour of the day.

"localhost_access_log.2013-08-20.txt" the file i want to search in

Last edited by enoch; 08-23-2013 at 05:21 AM.
 
Old 08-23-2013, 05:01 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Quote:
Originally Posted by enoch View Post
I want to grep a file to see all the transactions that were done at the 14th hour of the day.
Without knowing what the input looks like, we aren't able to help you.

Grep general usage:
Code:
grep "string" input
Also: What have you tried and which possible problems do you run into?
 
Old 08-23-2013, 05:43 AM   #3
olau
LQ Newbie
 
Registered: Jun 2006
Distribution: Debian Sarge ( lol I should generalize to: Debian Testing )
Posts: 15

Rep: Reputation: 1
in detail to help you we need to know how the timestamp looks like that you like to grep through...
 
Old 08-23-2013, 06:10 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Quote:
Originally Posted by enoch View Post
"localhost_access_log.2013-08-20.txt" the file i want to search in
That's the file name, we need to know what's inside the file and what, exactly, you want to grep.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Linux Command Line Grep johnjlaw Linux - Newbie 6 03-26-2013 11:39 AM
[SOLVED] run ps|grep command by script/command line ... ERROR: Unsupported option (BSD syntax) masuch Programming 4 05-23-2012 04:13 AM
Want to print fouth line after resulted line using grep with tail command saurabhmehan Linux - Newbie 10 08-04-2010 11:38 PM
Grep command and adding a line Treikayan Linux - Newbie 4 07-03-2009 09:57 AM
Help me in Grep Command + cd command in single line JeiPrakash Linux - Newbie 3 05-27-2008 04:16 AM


All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration