The efficiency tag has no wiki summary.
1
vote
3answers
257 views
Compacting `find` name patterns
I am using
find . -name '*.[cCHh][cC]' -exec grep -nHr "$1" {} ';'
find . -name '*.[cCHh]' -exec grep -nHr "$1" {} ';'
to search for a string in all files ending with .c, .C, .h, .H, .cc and .CC ...
18
votes
4answers
600 views
Are Linux utilities smart when running piped commands?
I was just running a few commands in a terminal and I started wondering, does Unix/Linux take shortcuts when running piped commands?
For example, let's say I have a file with one million lines, the ...
2
votes
1answer
152 views
Compare usage of memory by window managers
I'd like to test a few window managers to see which of them takes less memory and CPU in certain time period (so is better choice for older computers). I'd like to make the tests myself (not to read a ...
1
vote
1answer
259 views
Process priority and cpu speed
In some devices the cpu speed is dynamic, being faster when there is more load.
I was wondering if it is possible to set nice level or priority of a process so that it does not influence an increase ...
4
votes
2answers
114 views
check patterns that don't exist in sqlite
I explained a similar situation with plain text files on Grep huge number of patterns from huge file. Many people there said I should, so now I'm migrating my data to a sqlite database:
I have a file ...
1
vote
4answers
1k views
Can I access Nth line number of standard output?
Assuming a script that outputs a list of files:
$> bash someScript.sh
path/to/some/file
path/to/the/file/i/want/to/work/with
path/to/yet/another/file
Now I want to have the second file-path as ...
4
votes
2answers
568 views
How to install light-weight vim and to be able to efficiently load files into one instance vim?
On my laptop with Ubuntu I'm able to have just one instance of vim, launched with
vim --servername VIM
After this I'm able to open files from console with
vim --remote-silent filename
I use ...
4
votes
1answer
306 views
Efficiency of lots of inotify watches or stat calls
I am developing software that will utilize inotify to track changes on a large amount of files (tens to hundreds of thousands of files). I have come up with these ideas:
one watch per file
one watch ...
12
votes
3answers
4k views
How do I minimize disk space usage
One of my machines is the 2GB EeePC Surf, a neat netbook with very limited resources. So limited that right now, I have 22MB free space left.
On it, I'm running Arch Linux with the Openbox DE and a ...
