First 400,000 lines?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers First 400,000 lines?
# 1  
Old 01-11-2011
First 400,000 lines?

Hi,

I need to C&P the first 400,000 lines of a log file into a compressed file using Putty. I already tried emailing myself using mailx (didnt send) and used head -400000 access_log > /tmp/access_log to move the relevant lines into it's own file. And when I tried increasing the scroll back max to 400,000 and ran cat access_log, my window froze.

Anyone have a better way to do this? Thank!
# 2  
Old 01-11-2011
You are going to need something on the windows box to do that. A program like snagit comes to mind. Plain Putty will not do what you want.

Otherwise you will have to scp/sftp/ftp the file to your desktop. You can get a free desktop UNIX that runs under windows: Cygwin
Once you install it you can scp/sftp from your windows box.

You can also get WinSCP - WinSCP :: Free SFTP and FTP client for Windows
# 3  
Old 01-11-2011
What Operating System and version are you running?

The unix "head" command will not do 400,000 lines.


Base facts needed.

1) Is it definitely a unix format text file?
2) How big is the file? We are particularly interested if it is above 2 Gb but the size is important anyway.
Code:
ls -lad filename

3) How many lines in the file?
Code:
wc -l filename

4) Are you intending to transfer the file to a Windows platform. If so, what precise version of Windows (don't forget to mention if it is a server)?
5) What version of Putty?
6) Do you have ftp or sftp on both computers?
7) Which computer is to do the compression and what compression software will be used?
8) Reading between the lines, are you trying to mail a logfile to some external address?
9) What did you type for the mailx command? It is possible to mail sizeable attachments using mailx but it will fail if you try to send a huge mail body rather than an attachment. This whole question depends on the answer to question 1.

Last edited by methyl; 01-11-2011 at 08:20 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script for adding a table in mysql with 10,000 lines ... pls help

Hi , I am new to shell scripting . I need to write a shell script in sql to add 10,000 lines of data in a table . Pls help guys :) ---------- Post updated at 07:08 PM ---------- Previous update was at 03:40 PM ---------- guys please help !!! (3 Replies)
Discussion started by: vinumahalingam
3 Replies

2. AIX

AS/400

Hi everybody, I am learning AS/400 and working on it as a System Administrator. Can anybody please suggest me the best blog site for AS/400....just like Unix.com for Linux / Unix administrator. So that I can get all my answers related to AS/400... thanks in advance, kunal patil :) (0 Replies)
Discussion started by: kunalpatil09
0 Replies

3. UNIX for Dummies Questions & Answers

AS/400

Hi everybody,,,, This is kunal here, I am very new to as/400 and recently started working on it in one of IT company....I am planning to have Certification exam of AS/400. Can anybody please send me the links of different sites where I can have study material of AS/400 and also the details... (1 Reply)
Discussion started by: kunalpatil09
1 Replies

4. UNIX for Dummies Questions & Answers

AS/400

hi everyone,,, Can anybody tell me that whether the AS/400 is an "operating system" or a "Server" ? thanks in advance.... please if possible reply urgently,,,i am waiting..... (8 Replies)
Discussion started by: kunalpatil09
8 Replies

5. Solaris

apache ErrorDocument 400 /cgi-bin/400.cgi

Hi All, Sorry if the question is trivial for you but, I am new to Apache (2.0.63) and am trying to figure out how to display my 400.cgi. Here is what I have in httpd.conf servername testing DocumentRoot "/usr/local/apache2/htdocs" ErrorDocument 400 /cgi-bin/badrequest-400.cgi Here is... (0 Replies)
Discussion started by: afadaghi
0 Replies

6. News, Links, Events and Announcements

Microsoft "Donates" $3,000,000,000 to Feds

Surreal quote from the news link below: http://www.washingtonpost.com/wp-dyn/articles/A44615-2002Nov12.html (0 Replies)
Discussion started by: Neo
0 Replies
Login or Register to Ask a Question

Featured Tech Videos