Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

One of the linux commands commonly used during testing [find the contents of the specified file]

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

In this case, when viewing the log location problem, the log is transferred locally, then the file is opened with a local text editing tool, and then the keyword is found and analyzed. This will undoubtedly reduce efficiency.

Sorted out a few commonly used commands, you can quickly find.

Test file:

The file name is execution.log, and the contents of the file are as follows:

[error] Timed out after 50000ms

[error] Element css=#href_20_Id > span.title not found

[error] Element css=#addUserBtn not found

[error] Element css=td [title= "13011094548"] not found

[error] Element id=userIdList not found

[error] Element css=div.toast.toast-success not found

[error] There was an unexpected Alert!

[error] Element name=id [] not found

[error] Element xpath=//table/tbody/tr/td [3] not found

[error] Element css=div.toast-message not found

[error] Unexpected Exception: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFileOutputStream.init]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame:: chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js:: newFileOutputStream:: line 3112" data: no]. ToString-> function toString () {

Requirements: find information about Timed keywords

Grep method

Grep-I Timed execution.log #-I, ignore case

Grep-e. * ime execution.log #-e, which supports regular expressions

Vi method

/ str, forward search, top-down search

? Str, reverse search, bottom-up search.

Click n to find the location of the next occurrence; click N to find the location of the last occurrence

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report