Skip to content

Tag: linux

Bash: add string to the end of the file without line break

How can I add string to the end of the file without line break? for example if i’m using >> it will add to the end of the file with line break: I would like to add yourText2 right after yourText1 Answer If your sed implementation supports the -i option, you could use: With the second solution you&…

Connecting to WiFi using adb shell

I have all the details to connect to a particular access point. I have to use that access point only, so all I require is the command to do it. Answer You can add a network entry into the wpa_supplicant.conf yourself (or within your script) Essentially connect manually once, then do: and integrate the network…

How can I do congestion control for a UDP protocol?

I have a custom UDP protocol with multiple senders/receivers designed to send large files around as fast as possible. It is client/server based. How can I detect congestion on the LAN to slow the rate of UDP packets being sent? EDIT: please, no comments on the use of UDP whether it’s suitable or not. Th…

Doing a deep unrar of an archive using the unrar command in Linux

I use the following command to unrar all files in a rar-acrhive to a directory It works great and it ignores the directory structure inside the archive which is just what I want. How do I make it unrar all rar files inside the archive aswell if there are any? Answer Run find folder -name “*.rar” -…