由买买提看人间百态

topics

全部话题 - 话题: logfile
1 2 下页 末页 (共2页)
p****u
发帖数: 2422
1
来自主题: Linux版 - 请教个简单命令问题
from Advanced Bash-Scripting Guide:
http://www.tldp.org/LDP/abs/html/io-redirection.html
Chapter 20. I/O Redirection
Table of Contents
20.1. Using exec
20.2. Redirecting Code Blocks
20.3. Applications
There are always three default files [1] open, stdin (the keyboard), stdout
(the screen), and stderr (error messages output to the screen). These, and a
ny other open files, can be redirected. Redirection simply means capturing o
utput from a file, command, program, script, or even code block withi... 阅读全帖
d*****1
发帖数: 123
2
那个所谓的木马是批处理文件,人家的源码都给了,用EXEScript打包的。垃圾杀软就
这样。
sigh
附上源代码:
@Echo Off
COLOR 2F
Set Prog=老毛桃制作的 WinPE 专用安装工具
Set L1=      ╭══════════════════╮
Set L2=      ║                  ║
Set L3=   ╭══┤ %Prog%  ├══╮
Set L4=   ║  ║                  ║  ║
Set L5=   ║  ╰══════════════════╯  ║
Set L6=   ║                        ║
Set L7=   ╟════════════════════════╢
Set L8=   ║ 版权所有:老毛桃  仅供网友们交流 翻版不究 ║
Set L9=   ╰————————————————————————╯
Title %Prog%
Set PEFile=WinPE.IS_
Set PEIni=外置程序\WinPE.INI
Set LogFile=PEIn... 阅读全帖
c********e
发帖数: 417
3
来自主题: Unix版 - A question about awk
I'm not sure if redirection would work.
The logfile already exists, the > will not proceed. I can redirect to
a new file, remove the logfile, and rename the new file to logfile. But
I think it's not a good idea.
What's more,there are lots of other information in the logfile. I only
change the backuptimes. There is no need to redirect the whole file.
Thanks anyway.
k***e
发帖数: 7933
4
来自主题: DotNet版 - 中文问题请教 (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: kanke (回家), 信区: Programming
标 题: 中文问题请教
发信站: BBS 未名空间站 (Fri Oct 24 15:16:02 2014, 美东)
Dev环境:英文版windows7,安装了中文包。在region and language里面,location设
置成United States,display language设置成英文, language for non-unicode
program设置成Chinese(Simplified, PRC)
Production环境: 英文版windows server 2012 R2. 设置同上。
问题:
在Dev环境下开发的asp.net网页,支持中文,显示输入都没有问题。 Logfile(文本文
件)里面记录的中文也没有问题。
发布到production环境后, 网页上的中文显示输入都没有问题。 但是Logfile里面记
录的中文成了乱码。在production环境里面本身看中文的网站没有问题,看中文的文本
文件也没有问题。现在唯一的问题就... 阅读全帖
k***e
发帖数: 7933
5
来自主题: Programming版 - 中文问题请教
Dev环境:英文版windows7,安装了中文包。在region and language里面,location设
置成United States,display language设置成英文, language for non-unicode
program设置成Chinese(Simplified, PRC)
Production环境: 英文版windows server 2012 R2. 设置同上。
问题:
在Dev环境下开发的asp.net网页,支持中文,显示输入都没有问题。 Logfile(文本文
件)里面记录的中文也没有问题。
发布到production环境后, 网页上的中文显示输入都没有问题。 但是Logfile里面记
录的中文成了乱码。在production环境里面本身看中文的网站没有问题,看中文的文本
文件也没有问题。现在唯一的问题就是从asp.net程序里面写到logfile里中文成了乱码。
请教一下大家,怎么解决?谢谢。
k***e
发帖数: 7933
6
来自主题: Programming版 - 中文问题请教
更新:
我用的是notepad++文本编辑器,在dev上生成的logfile里面的中文是好的。
在production上生成的logfile用notepad++打开看到的貌似是乱码,但是可能是
unicode。比如“董”字显示是\xB6\xAD。 我刚才试着用windows自带的notepad打开,
里面的中文显示就对了。但是这个字符串不能copy paste,不是纯文本。
另外在producttion上这个logfile也用UDP送到了splunk上,在splunk上面看到的也是\
xB6\xAD。
求解惑。。。
s*********a
发帖数: 16
7
来自主题: JobHunting版 - Amazon onsite面经
首先有个path的定义, 比如说有个用户visit Amazon.com, 先点了page1, 然后点了
page2, 然后点了page3, 那么page 1, 2, 3就构成了一个path.
现在给你一个logfile, 记录一段时间内所有user的网页点击历史, 每一条记录包括
sessionID, pageID, timestamp.
问题: 统计所有路径的出现次数.
一点说明: 假如现在你从这个Logfile得到了某sessionID的先后访问的页面为page 1,
2, 3, 4, 5, 那么从中你可以得到path有多条, 每个由三个组成,
1, 2, 3
2, 3, 4
3, 4, 5
Follow-up: 回答完上面的问题, 他会问, 现在如果一个user已经访问了page1, page2,
怎样根据以上Path的统计数据预测下面他会点击哪个page.
这题好像是他们的实际工作中遇到的, 是我这个特定的组的, 所以我觉得重复的可能性
基本为零.
k*n
发帖数: 150
8
来自主题: JobHunting版 - 急, 请教个面试问题
思路是你提的人家顺着说的还是人家说的让你发挥?
如果是我的话,第一反应就是awk,基本上是线性时间内处理一遍
虽然很笨,但是这是最直接和方便的办法,如果是面试,我肯定会先说
接下来,十分大的logfile本身我觉得不应该完全放到内存数据结构里
如果是logfile的话,它是不断增长的是比较合理的假设,所以不能考虑重写它
所以就是以空间换时间的办法,建立一个内存中的索引
这一般来说又有两种选择,hashtable或者B+树
仍然视实际情况而定,如果为了实现快速使用方便,我首选hashtable
因为大多数高级语言都有很好的hashtable的实现
其实我觉得对url来说,hashfunction并不是关键
hashtable在这个应用中最关键的缺陷在于这个索引几乎必须完全保存在内存里
那么当问题是GB数量级的话还可以handle,再增长的话就基本不work了
这种情况下,B+树或者类似的树索引是我能想到的最后的解决方案了
占用多少内存自己说的算,访问也很快,最大缺陷是实现复杂
每一个细节处理都很麻烦,这就没法再细说了

它。
t*****t
发帖数: 86
9
我去年的onsite是上午三轮算法下午一轮上机。
算法第一题是给一个string和两个keyword,返回最短的包含俩keyword的substring。
第二题类似leetcode的merge k lists,但是给的是iterator,要注意怎么优化使用。
第三题类似leetcode的path sum II,不过给的不是treenode而是两个类,一个edge一
个vertice,写的时候会麻烦一点但是思路是一样的。下午上机是给一个logfile,里面
每行有userid,activity,timestamp什么的,规定在一定时间内(好像是90s)如果用
户没有activity则认为是一个session结束。要求读取logfile内容然后按时间顺序输出
所有的session到标准输出流。我用的java,os是ubuntu,ide是eclipse,虽然他们上
班好像用intelliJ,时间一个半小时,注意最大的test case很大,所以做的时候注意
memory的使用,不要整个file读完才开始写不然会爆内存,也不要把所有东西都一直存
在hashmap里,不然会爆,有的东西没用所以... 阅读全帖
t********e
发帖数: 32
10
来自主题: Running版 - 照片来了~~~
以前pen用python写了个小程序抓图, 谁要是改改应该就能用了把
#!/usr/bin/env python
import cgi
import cgitb; cgitb.enable() # for troubleshooting
from datetime import datetime
import sys
import os
import re
import getpass
import urllib
print "Content-type: text/html"
print
print """


"""
form = cgi.FieldStorage()
event = 00
bib = 9079
#event = int(form["event"].value)
#bib = int(form["bib"].value)
pics = []

base_dir = "/Users/changyao/Desktop/brightroom"
#base_dir = "/tmp"
os.chdir(base_dir)
logfile = "l... 阅读全帖
D***3
发帖数: 12712
11
来自主题: Hardware版 - 如何把OS装在这个32GB SSD里?
Win7/Win8占用空间最大文件夹都是在Windows/winsxs目录里面,
也有人说这个文件夹不会重复占用空间
其实安装了系统更新补丁,winsxs增大了很多体积...
以Windwos7旗舰版 Bit64为例:
安装后占用C盘空间大概9G左右
安装IE9以及.NET,以及全部更新以后占用接近到了14G了...
常规清理大家都知道:
1:关闭系统还原
2:删除休眠文件
3:系统垃圾清理
4:X:\Windows\WinSxS\BackUp清理
5:X:\Windows\SoftwareDistribution\Download 补丁下载清理
6:也许你还知道的其他目录清理
那么还可以清理那些文件呢?我来给总结一下:
X:\Windows\WinSxS\BackUp
X:\Windows\WinSxS\Temp\PendingDeletes
X:\Windows\SoftwareDistribution\Download
X:\Windows\Installer\$PatchCache$
X:\Windows\winsxs\ManifestCache
X:\Recovery\*\W... 阅读全帖
J*e
发帖数: 230
12
来自主题: Internet版 - 在unix下屏蔽Junk Mail方法
1. 在 ~/ 建立文件 .procmailrc , 内容如下:
#Set on when debugging VERBOSE=off
#Replace `mail' with your mail directory (Pine uses mail, Elm uses Mail)
MAILDIR=$HOME/mail
#Directory for storing procmail log and rc files
PMDIR=$HOME/.procmail
LOGFILE=/dev/null
# LOGFILE=$PMDIR/log
# INCLUDERC=$PMDIR/rc.testing
INCLUDERC=$PMDIR/rc.maillists
2. 在 ~/ 下建立目录 .procmail
3. 在 .procmail/ 里建立两个文件, 一个是 .forward, 一个是 rc.maillists
.forward 的内容是:
"|I
l*******G
发帖数: 1191
13
来自主题: Linux版 - 如何重新控制一个进程
Screen help:
http://www.rackaid.com/resources/linux-screen-tutorial-and-how-
http://news.softpedia.com/news/GNU-Screen-Tutorial-44274.shtml
GNU Screen is a free terminal multiplexer that allows console users to run
any number of text-based applications, interactive command shells, curses-
based applications, text editors etc, within a single terminal. Similar to
VNC, screen enables you to start applications from one computer, reconnect
from another computer and continue using the same applicatio... 阅读全帖
k******r
发帖数: 2300
14
来自主题: Unix版 - Another simple question
[[! -s $LOGFILE ]] && touch $LOGFILE
What does it mean? Thanks a lot.
i*****8
发帖数: 6735
15
来自主题: _Xiyu版 - 硬工碰到软问题
熟悉perl的大侠们,
我需要deliver个perl program,user run这个程序的时候有个-logfile option。
可是我想把要print到logfile里的东西在stdout上也显示出来。
simple的方法就是每个msg print两次。
有没有办法只用一次print command,两个地方都有msg了呢?
i*****8
发帖数: 6735
16
来自主题: _Xiyu版 - 硬工碰到软问题
去掉logfile option万一出了问题我就无据可查了。。。我还想着偷偷加个logfile,
colect些statistics自己用,嘿嘿
v******n
发帖数: 24
17
来自主题: HiFi版 - 卡拉OK软件更新
装了终极解码,你的软件就可以用了,礼光的108版似乎也可以了。我也记得你的应该
不需要codec所以也很纳闷。
现在在腾另一台机器,还是不行,装了终极解码后你那个player可以放了,但是用软件
选好歌以后不放,能显示每首歌总长度,就是黑着屏不往前走,貌似黑屏中间有个灰框
,也算比以前有些进步,以前不装额外的解码或者用完美解码的时候总长度都出不来。
等会我找logfile发给你看看。
g**e
发帖数: 6127
18
来自主题: JobHunting版 - 急, 请教个面试问题
赞,文件小awk直接就搞定了
其实我还是觉得这个应该存在数据库而不是logfile
s*********e
发帖数: 36
19
来自主题: JobHunting版 - 急, 请教个面试问题
如果以后经常会range search,那么用B+ tree适合。如果确定说就用hash table,我
赞同这句
“hashtable在这个应用中最关键的缺陷在于这个索引几乎必须完全保存在内存里”,
logfile应该是
不断增大的,一台机器的内存很快就无法承受。如果可以用distributed hash table,
把hash
table分到几台联机的机器上用consistent hashing可以做。
l*********y
发帖数: 44
20
来自主题: JobHunting版 - 亚马逊电面一
Logfile 你是怎么答的呢。。。
m**q
发帖数: 189
21
来自主题: JobHunting版 - 问两道amazon的面试题
两个hash,一个user hash,每一项存userid和对应的三连击中的前两个值;一个三连
击hash,存三连击string和count。
对于logfile中的每一行,在这两个hash中查找并更新。如果认为每次hash的复杂度为O
(1),则总的时间复杂度为O(n)。空间复杂度为O(m+k),m为userid的个数,k为不同的三
连击的个数。
w**********l
发帖数: 8501
22
哈哈,
我这人记忆力不大好,所以,什么时候用i,什么时候用j,模块是有功能差异的,每次
都分家使用。不够用的话,就进一位,比如ii,jj什么的。
如果i和j放一块,别人明白了,我自己就糊涂了。
刚找出一个我常用的perl script,里面没进位,却是用数字控制的,所以我说你眼光
太毒了也。这么细节的东西,我自己从来没注意过,这个script是两年前写的,一直在
用。我从来从来都没用过abc做loop counters.
$i1 = 0; $j1 = 0; $k1 = 0;
$i2 = 0; $j2 = 0; $k2 = 0;
$i3 = 0; $j3 = 0; $k3 = 0;
foreach $lines1 () {
}
F**********r
发帖数: 237
23
来自主题: JobHunting版 - 问个算法题7
也是版上来的。。。 不知道这个题目给的数字3在这里有什么帮助。最naive就是n-1
common sequence.不好。
要么就是都生成3的组合,然后看哪个出现的最多。如果logfile entry多的话,明显也
不好。
有什么好的办法没?
Given a log file, which contains a series of websites, which the user has
visited, find the most frequent path of 3 websites.
e.g: If this is a log file
A B C D E
A C D B E
C D E B A
A C D E B
C D E A B
t******r
发帖数: 209
24
就是前几天有人贴的这个题吧:
Userid PageID
A 1
A 2
A 3
B 2
B 3
C 1
B 4
A 4
找出最常用的length-3访问序列:对于用户A:1-2-3, 2-3-4 用户B:2-3-4
2-3-4 是最常见的
两个hash,一个user hash,每一项存userid和对应的三连击中的前两个值;一个三连
击hash,存三连击string和count。
对于logfile中的每一行,在这两个hash中查找并更新。如果认为每次hash的复杂度为O
(1),则总的时间复杂度为O(n)。空间复杂度为O(m+k),m为userid的个数,k为不同的三
连击的个数。
g*********e
发帖数: 14401
25
来自主题: JobHunting版 - 亚麻 三连击
given a logfile
a A
b B
a B
c E
a C
where left column is user ID, right column is page ID
find the most frequent pattern of 3 consecutive page visits of all the users.
Solution:
two hash table:
1. indexed by user, entry content=previous two visit page IDs of the user
2. store the count. indexed by 3 page IDs? cannot remember...
w****3
发帖数: 232
26
来自主题: JobHunting版 - MS on-site 面经&求分析(口头offer)
今天早上收到的邮件,不过说给我安排的不是面我的那组(这是怎么回事?)是Engineering Systems Dev team。 有谁知道这是干啥的不?怎么感觉是干杂活的啊。
------------------------------------------------------------------------------------------
周五的面试,今天发邮件给hr和大boss,都没有回信。下面的是周六写的,不过那时候
刚刚注册,所以现在才能发上来。有懂的帮我看看还有没有希望。
面试11:30 开始,先是见到一个hr,简单的询问了一些问题。因为我现在有工作,所以
他问了问公司的事情。
第一轮技术面试12:30 开始,跟一个senior的印度女士的lunch interview, 1个半小
时。吃饭的时候聊了聊两个公司的产品,构架,询问毕业之后在公司里的工作。回到办
公室,开始问算法,写code。题目很简单,就是一颗BT,怎么找两个点,他们的和是给
定的一个数。BST如何做,只找一对和找出所有的pair的code怎么写。写code的时候有
点失误,而且因为字迹太潦草。。... 阅读全帖
p*********m
发帖数: 619
27
来自主题: JobHunting版 - MS on-site 面经&求分析(口头offer)
面试MS有5轮面试的话,见到了manager,通常希望都是很大的
如果没希望的,3,4轮后就结束了。当然表现最好的可能当场就给offer了。
但是如果见到了manager,一般来说都很有希望。
提前恭喜一下

周五的面试,今天发邮件给hr和大boss,都没有回信。下面的是周六写的,不过那时候
刚刚注册,所以现在才能发上来。有懂的帮我看看还有没有希望。
面试11:30 开始,先是见到一个hr,简单的询问了一些问题。因为我现在有工作,所以
他问了问公司的事情。
第一轮技术面试12:30 开始,跟一个senior的印度女士的lunch interview, 1个半小
时。吃饭的时候聊了聊两个公司的产品,构架,询问毕业之后在公司里的工作。回到办
公室,开始问算法,写code。题目很简单,就是一颗BT,怎么找两个点,他们的和是给
定的一个数。BST如何做,只找一对和找出所有的pair的code怎么写。写code的时候有
点失误,而且因为字迹太潦草。。。有几句code解释来好些时间。不过总的来说我刚觉
和她聊得还不错。因为这轮过后,我就被额外加了两轮面试(原schedule只有三轮,据
说是表现好... 阅读全帖
r*****e
发帖数: 792
28
不是share了F的题吗?正在skype上和T的另一个组interview,说是
今天给消息,不过不看好,因为他们是做linux kernel的,我只是linux
的使用者,但是今天什么coding题都没出,就是让写一个python的程序
来parse logfile,我说用c++行吗,回答就python吧。只好硬着头皮写了
一个,不天天用,有些function都想不起来了,思想肯定对,syntax error
也肯定有。还问了个如果upgrade 了kernel后,数据库变慢怎么回事。
说了一些可能的情况,也不知道对错。正好前几天公司的一些机器升级,
出过一些问题,就把记得的问题都说了,还算靠谱。又加了些自己升级系统/package
的经验。还有一个问题是怎么写程序访问website,以及http的protocol,我说
了前面的,但protocol我直接说没做过,不想胡说。然后就问了新的http
protocol里要加上host name是为什么。想了想,居然给蒙对了,呵呵。
最后一个人一直没有出现,一会就准备走了,下午还要和g的manager碰头呢。
因为已经有了一轮onsite... 阅读全帖
n****a
发帖数: 174
29
来自主题: JobHunting版 - 用scala和spark的都是什么工作?
比如存大数据的logfile
p**f
发帖数: 49
30
来自主题: WmGame版 - help debug!

hehe, a big question
There is not special way that can resolve these kinds of crash.
From my experience, when the system is not stable,
open the debug option of mudos, and try to get rid of all the error
msg in logfile.
n**b
发帖数: 13203
31
来自主题: PhotoGear版 - 万佛 求问扫Xpan
这样装片
然后用Vuescan,Load这个文件ini文件, Select auto scan
[VueScan]
[Input-LS-9000]
Mode=3
[Output]
JPEGFileName=Xpan_001+.jpg
PDFMultiPage=0
DefaultFolder=C:\Users\shenyi\Pictures\Film\New_Xpan
JPEGQuality=100
LogFile=0
[Prefs]
StartupTip=0
WindowXOffset=84
WindowYOffset=50
WindowXSize=1512
WindowYSize=909
GuidedMode=0
Options=1
[Input-LS-9000-MediumFormat]
Media=2
BatchScan=1
FrameSpacing=10504
PreviewResolution=6
ScanResolution=2
Rotation=1
Focus=-22
RGBExposure=2580
[Crop-LS-9000-MediumFormat]
CropSiz... 阅读全帖
i******i
发帖数: 54
32
来自主题: BuildingWeb版 - IP address
你去看看iis的日志属性设置。
或者 :
一个办法就是安装一些监控软件,这些软件可以记录访问者的ip地址(分段,分区域分析)
还有很多功能.... 当然 基本都是收费的。
第二个办法:
你定制你的logfile属性,譬如说只记录ip,把它导入数据库。
然后你做个处理程序,处理 ip记录表 和 地址表
(你可以从qq的wry文件获取,网上有down) 在需要的时候运行这个程序,分析得出你想要
得结果。
j***e
发帖数: 7
33
If u can access logfile.
then use some log analysis (Analog/Webalizer.) or read it yourself.
else, use hosted script embeded in ur pages (check http://directory.google.c
om/Top/Computers/Software/Internet/Site_Management/Log_Analysis/ out)
l***r
发帖数: 459
34
来自主题: Database版 - question on create a db manually
Greetings,
I met this error when I try to create a database manually:
ERROR at line 1:
ORA-30014: operation only supported in Automatic Undo Management mode
My simple script looks like:
create database SMALL
logfile
group 1 ('/opt/oracle/oradata/SMALL/redo101.log',
'/opt/oracle/oradata/SMALL/redo102.log') SIZE 5M REUSE,
group 2 ('/opt/oracle/oradata/SMALL/redo201.log',
'/opt/oracle/oradata/SMALL/redo202.log') SIZE 5M REUSE
ARCHIVELOG
datafi
c*****d
发帖数: 6045
35
来自主题: Database版 - 找人这么难
大家讨论讨论?
Q1. how does redo log gets switched
没明白问题的考点。Oracle redo log file写满redo entry就会自动switch到下一个
log group。我觉得我的回答更像是回答when does redo log get switch
Q2. how to force redo log switch automatically every 30 mins if it hasn't
switched by then
不明白考点。写一个job,every 30 min执行"alter system switch logfile"?
Q3. how to check if primary and standby database are in sync?
这个比较简单,就是查v$archived_log,看看primary上的max log sequence,standby
上apply的log sequence
s**********o
发帖数: 14359
36
来自主题: Database版 - DB2 Stored Procedure Error Handler
TSQL毕竟只是MANIPULATE数据的,如果SCHEMA有问题,
或者被改了,一般不用ERROR HANDLE的,直接让STORED PROC
出错,出错了你才知道TABLE被改了或者不存在,否则
谁也不会看那个LOGFILE,数据可能几个月都没LOAD起来
你才发现问题
c*****d
发帖数: 6045
37
来自主题: Database版 - 搞不定了
你的意思是说有这个一个database_A
use [master]
select * from sys.master_files
where database_id = DB_ID ('database_A');
GO
use [database_A]
select * from sys.database_files;
GO
然后返回的结果中log file的名字不同
是这样吗?
dbcc checkdb返回什么错误
你试过哪种方法去shrink logfile
dbcc shrinkfile (file_id)
or
dbcc shrinkfile (file_name)
提问的时候尽量把问题说清楚,全面一些
否则别人没法回答你的问题
d****t
发帖数: 362
38
来自主题: DotNet版 - log file
I want to record the transaction in a log file, which will be placed in a
subdirectory, called log, residing the same directory as my web project. Let's
say, my web project is at: "D:\Inetpub\wwwroot\projectA", and the logfile,
named log.txt, resides at "D:\Inetpub\wwwroot\projectA\log". The question is
how to get the virtual directory of a web project, such as projectA? I don't
want to hardcode this for ease of transfer to other machines.
c*o
发帖数: 70
39
来自主题: DotNet版 - easy question, but ...
Many users will write to the same logfile, how can I make sure there is no
conflict when there are some concurrent access? I can't find a method to check
if the file is open or not.
Would you please add some sample code based on the following code? Thank you
so much!
StreamWriter sw=File.AppendText (sLogFile);
sw.WriteLine (DateTime.Now.ToLongTimeString ()+" "+sText);
sw.Flush ();
sw.Close ();
c*********e
发帖数: 16335
40
用asp.net做一个网页,实时用dashboard report给公司各头头某些工业数据。
database有ibm 的 Unidata, access, sql server, excel files.
需要给各个不同的user不同的dashboard来汇报real time 数据。
这个有什么要注意的地方? 貌似普通的aspx网页就能做到了吧?
实时数据,是从database取,还是建立一个logfile.txt,从txt文件里取?隔多久取一
次好?隔几秒钟?
database多长时间更新一次好?每隔15分钟? 每隔30分钟?
n***t
发帖数: 8357
41

seems it's working now.
how can I make sure it works? logfiles doesn't show anything unless it hits
errors.
thanks.
u****s
发帖数: 2186
42
来自主题: Java版 - Java 面试题
我感觉Linux比以前用的更广泛了。
我们的server是在Amazon EC2上的Linux, 所以才问一些Unix commands。
是nohup,敲错了。
tee 还算是挺常用的。测试的时候经常tail -f logfile | tee test.log
产生一个只和这次测试有关的log文件。
strings不常用,只是因为当天用了一次,所以想问的。
sed,awk现在很少有人用了。
如果简历上不写用过Unix/Linux,我是不会问的。
s****n
发帖数: 700
43
这个问题我想了很长时间,还是没有解决办法。请高手指点一下。
我有一个logfile格式如下
send ........
send ........
................
............
send..........
...................
................
send..........
heartbeat..........
...............
send........
...........
.........
send..........
send.........
send..........
heartbeat..........
....
send...
.....
heatbeat....
....
我现在想找出所有的在heartbeat前面的send行, 类似于,
send....
heartbeat.....
send...
send..
send...
heatbeat....
l*******G
发帖数: 1191
44
来自主题: Linux版 - screen是干啥的
补充一点,screen 的log功能很强大
ctrl+a : 然后输入
logfile logfilename.txt
ctrl+a : 然后输入
log
这样所有的screen过程就被记录到logfilename.txt中了。
退出screen 后可以用如下方法把logfilename.txt清理一下,去掉其中的所有特殊字符:
screen #start a new screen to clean the logfilename.txt
cd /path/to/logfilename.txt
wc -l logfilename.txt
screen -X scrollback nnnn #nnnn is the number of
#lines found from your wc command + 50
cat logfilename.txt
screen -X hardcopy -h logfilename.txt.cleaned
exit
logfilename.txt.cleaned 是清理后的log
非常适合于... 阅读全帖
a9
发帖数: 21638
45
来自主题: Linux版 - ubuntu 12.04 pptpd问题。
这是我路由里的
logfile /var/log/pptpd-pppd.log
debug
lock
name *
proxyarp
minunit 4
nobsdcomp
lcp-echo-failure 10
lcp-echo-interval 5
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
nomppe-stateful
ms-ignore-domain
chap-secrets /tmp/pptpd/chap-secrets
ip-up-script /tmp/pptpd/ip-up
ip-down-script /tmp/pptpd/ip-down
mtu 1450
mru 1450
ms-dns 8.8.8.8
ms-dns 8.8.4.4
你参考一下。
F*******i
发帖数: 190
46
来自主题: Programming版 - 请问, 有这样的perl module 吗
主要是有一些binary 的 job 要run,
想让, perl script 来 monitor 这些 jobs 的
return code
or
std output
or
logfile
来 diagnose job status, 然后作一些后期的工作, 比如说
report or rerun?
谢谢
s****n
发帖数: 700
47
来自主题: Programming版 - 一个头痛的regular expression问题
【 以下文字转载自 Linux 讨论区 】
发信人: sallen (looking for job), 信区: Linux
标 题: 一个头痛的regular expression问题
发信站: BBS 未名空间站 (Thu Aug 27 01:27:26 2009, 美东)
这个问题我想了很长时间,还是没有解决办法。请高手指点一下。
我有一个logfile格式如下
send ........
send ........
................
............
send..........
...................
................
send..........
heartbeat..........
...............
send........
...........
.........
send..........
send.........
send..........
heartbeat..........
....
send...
.....
heatbeat....
....
我现在想找出所有的在heartb
1 2 下页 末页 (共2页)