bsd

描述常见的开源协议(GPL,LGPL, BSD,Apache等)以及开源协议的区别

假装没事ソ 提交于 2019-11-27 01:33:07
GPL:是GNU General Public License的缩写,它和其他的开源协议不一样,在获取源码修改后不允许闭源,新增代码重新发布时要采用GPL开源协议 LGPL:是 GNU Lesser General Public License (GNU 宽通用公共许可证)的缩写形式,在GPL协议的基础上发布的更宽松的协议,获取源码修改后可以选择公开一部分源码,来获取开发软件的拥有权 MPL:是The Mozilla Public License的简写,Mozilla小组为其开源软件项目设计的软件许可证。它在获取开源源码中,修改里面的一部分代码后选择提供说明文档,来描述改动的功能。 BSD许可证:是原先是用在加州大学伯克利分校发表的各个版本的许可证(BSD是Berkly Software Distribution的简写)。相较于GPL许可证和MPL许可证的严格性,BSD许可证就宽松许多了,一样是只需要附上许可证的原文,它还要求所有进一步开发者将自己的版权资料放上去,所以拿到以BSD许可证发行的软件可能会遇到一个小状况,就是这些版权资料许可证占的空间比程序还大。 MIT许可证之名源自麻省理工学院(Massachusetts Institute of Technology, MIT),是许多软件授权条款中,被广泛使用的其中一种。与其他常见的软件授权条款(如GPL、LGPL、BSD)相比

What is the status of POSIX asynchronous I/O (AIO)?

感情迁移 提交于 2019-11-26 23:31:08
There are pages scattered around the web that describe POSIX AIO facilities in varying amounts of detail. None of them are terribly recent. It's not clear what, exactly, they're describing. For example, the "official" (?) web site for Linux kernel asynchronous I/O support here says that sockets don't work, but the "aio.h" manual pages on my Ubuntu 8.04.1 workstation all seem to imply that it works for arbitrary file descriptors. Then there's another project that seems to work at the library layer with even less documentation. I'd like to know: What is the purpose of POSIX AIO? Given that the

find -exec a shell function in Linux?

江枫思渺然 提交于 2019-11-26 11:48:19
问题 Is there a way to get find to execute a function I define in the shell? For example: dosomething () { echo \"doing something with $1\" } find . -exec dosomething {} \\; The result of that is: find: dosomething: No such file or directory Is there a way to get find \'s -exec to see dosomething ? 回答1: Since only the shell knows how to run shell functions, you have to run a shell to run a function. You also need to mark your function for export with export -f , otherwise the subshell won't

How do I use a new-line replacement in a BSD sed?

↘锁芯ラ 提交于 2019-11-26 09:45:10
问题 Greetings, how do I perform the following in BSD sed? sed \'s/ /\\n/g\' From the man-page it states that \\n will be treated literally within a replacement string, how do I avoid this behavior? Is there an alternate? I\'m using Mac OS Snow Leopard, I may install fink to get GNU sed. 回答1: In a shell, you can do: sed 's/ /\ /g' hitting the enter key after the backslash to insert a newline. 回答2: Another way: sed -e 's/ /\'$'\n/g' See here. 回答3: For ease of use, i personally often use cr="\n" #

sed in-place flag that works both on Mac (BSD) and Linux

元气小坏坏 提交于 2019-11-26 00:16:05
问题 Is there an invocation of sed todo in-place editing without backups that works both on Linux and Mac? While the BSD sed shipped with OS X seems to need sed -i \'\' … , the GNU sed Linux distributions usually come with interprets the quotes as empty input file name (instead of the backup extension), and needs sed -i … instead. Is there any command line syntax which works with both flavors, so I can use the same script on both systems? 回答1: If you really want to just use sed -i the 'easy' way,

sed not giving me correct substitute operation for newline with Mac - differences between GNU sed and BSD / OSX sed [duplicate]

限于喜欢 提交于 2019-11-25 23:25:45
问题 This question already has an answer here: Replace comma with newline in sed on MacOS? 13 answers I\'m using this reference : sed help: matching and replacing a literal "\\n" (not the newline) and I have a file \"test1.txt\" that contains a string hello\\ngoodbye I use this command to search and replace \"\\n\" with actual new line characters: sed -i \'\' \'s/\\\\n/\\n/g\' test1.txt but the result is: hellongoodbye . it just replaces the \"\\n\" with \"n\" and not an actual new line. This does