UNIX: Some useful commands
程序员文章站
2022-05-08 19:25:18
...
1. To search a string from the content of files.
E.g. Search 'logo.gif' from all jsp,html and xsl files under current folder
2. To get lines in a certain range from file which is huge
E.g. Get the lines from 20 to 2000 from stdout.txt
E.g. Search 'logo.gif' from all jsp,html and xsl files under current folder
find . \( -name '*.jsp' -o -name '*.html' -o -name '*.xsl' \) -exec grep -l logo.gif {} \;
2. To get lines in a certain range from file which is huge
E.g. Get the lines from 20 to 2000 from stdout.txt
sed -n '20,2000p' stdout.txt > test.txt
推荐阅读
-
There have some useful link to cvs.
-
【DataStructure】Some useful methods for arrays
-
Some useful tips about sox rec
-
【DataStructure】Some useful methods about linkedList(二)
-
【DataStructure】Some useful methods about linkedList.
-
some useful
-
some useful php function 2
-
Some Useful DQL Tips
-
Some useful python code
-
Some useful python function