How to use CMAKE_INSTALL_PREFIX
That should be (see the docs): cmake -DCMAKE_INSTALL_PREFIX=/usr ..
That should be (see the docs): cmake -DCMAKE_INSTALL_PREFIX=/usr ..
This command: iconv -f utf-8 -t utf-8 -c file.txt will clean up your UTF-8 file, skipping all the invalid characters. -f is the source format -t the target format -c skips any invalid sequence
screen! It’s the best thing since sliced bread. (Yeah, I know others have already suggested it, but it’s so good the whole world should join in and suggest it too.) screen is like, like, ummmm … like using VNC or the like to connect to a GUI destop, but for command shell windows. You can … Read more
time produces good enough times for benchmarks that run over one second otherwise the time it took exec()ing a process may be large compared to its run-time. However, when benchmarking you should watch out for context switching. That is, another process may be using CPU thus contending for CPU with your benchmark and increasing its … Read more
If you want see your buffer size in terminal, you can take a look at: /proc/sys/net/ipv4/tcp_rmem (for read) /proc/sys/net/ipv4/tcp_wmem (for write) They contain three numbers, which are minimum, default and maximum memory size values (in byte), respectively.
You can use octal notation directly: os.Mkdir(“dirname”, 0700) Permission Bits +—–+—+————————–+ | rwx | 7 | Read, write and execute | | rw- | 6 | Read, write | | r-x | 5 | Read, and execute | | r– | 4 | Read, | | -wx | 3 | Write and execute | | … Read more
Square Brackets [ ] The square brackets ( [ ] ) indicate that the enclosed element (parameter, value, or information) is optional. You can choose one or more items or no items. Do not type the square brackets themselves in the command line. Example: [global options], [source arguments], [destination arguments] Angle Brackets < > The … Read more
I have used a simple script with cron to make sure that the program is running. If it is not, then it will start it up. This may not be the perfect solution you are looking for, but it is simple and works rather well. #!/bin/bash #make-run.sh #make sure a process is always running. export … Read more
This bash script is for N parallel threads. Each argument is a command. trap will kill all subprocesses when SIGINT is catched. wait $PID_LIST is waiting each process to complete. When all processes have completed, the program exits. #!/bin/bash for cmd in “$@”; do { echo “Process \”$cmd\” started”; $cmd & pid=$! PID_LIST+=” $pid”; } … Read more