ln

04_ln-建立链接文件

China☆狼群 提交于 2019-11-29 18:52:23
目录 建立链接文件:ln 建立链接文件:ln Linux链接文件类似于Windows下的快捷方式 链接文件分为软链接和硬链接。 软链接:软链接不占用磁盘空间,源文件删除则软链接失效。 硬链接:硬链接只能链接普通文件,不能链接目录。 通过链接文件可以修改原文件内容 ln 源文件 链接文件 # 创建硬链接 ln -s 源文件 链接文件 # 加 -s 创建软链接 如: ln 1.txt 2.txt # 为1.txt这个文件建立一个硬链接 ln -s 3.txt 4.txt # 为3.txt建立软链接 来源: https://www.cnblogs.com/nichengshishaonian/p/11526939.html

【u-boot-2018.05】make配置过程分析

▼魔方 西西 提交于 2019-11-29 16:48:58
https://blog.csdn.net/q_z_r_s/article/details/80718518 从u-boot-2014.10版本引入Kbuild系统之后,Makefile的管理和组织跟以前版本的代码有了很大的不同,这使Makefile变得更加复杂。整个Makefile中,include很多其它不同用途的Makefile,各种目标和依赖也很多,因此要想搞清楚make的执行过程很困难;使用u-boot之前首先是对其进行配置,命令为: make xxx_defconfig 上述命令执行之后会生成对应的.config文件,接下来就可以进行最后的编译工作了,直接输入make即可。 配置流程分析 执行make xxx_defconfig命令时,u-boot根目录下的Makefile中有唯一的规则匹配目标: %config: scripts_basic outputmakefile FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ 其中$(build)在kbuild.include中定义: build := -f $(srctree)/scripts/Makefile.build obj 依赖scripts_basic: # Basic helpers built in scripts/ PHONY += scripts_basic

Using find on subdirectories and create symlinks to all files

ぐ巨炮叔叔 提交于 2019-11-29 12:05:13
Ok, so I've been trying to get my head around this, but I'm struggling. The premise is this: I have a directory with lots of subdirectories (some of which also contain more subdirectories), and I've got another separate directory on a different share which mimics the source directory in the layout. What I need now is a way of looping through the source directory, discovering the files in the subdirs, and then creating symlinks to them in the destination dir. In case this isn't that clear, this post describes it fairly well, except that that question is aimed at symlinking dirs, rather than the

【九省联考2018】一双木棋

半城伤御伤魂 提交于 2019-11-28 20:20:22
题面 https://www.luogu.org/problem/P4363 题解 很套路的$hash$状态$+dp$。 可知棋子形成的形状一定是一个连续的倒楼梯形(楼梯向右延伸的长度可以不连续,但一定单调) $hash$轮廓就行了。 #include<iostream> #include<cstdio> #include<cstring> #include<vector> #define ri register int #define N 11 #define LL long long #define INF 1000000007 #define mod 1233107 using namespace std; int a[N][N],b[N][N]; LL pow[N]; int n,m; vector<int>f[mod]; vector<LL>g[mod]; int dfs(LL x) { int ln[N]; int yx=x%mod; for (ri i=0;i<g[yx].size();i++) if (g[yx][i]==x) return f[yx][i]; g[yx].push_back(x); f[yx].push_back(0); int tl=f[yx].size()-1; int tot=0,opt,ret; LL tx=x,nx; for (ri i

软连接

霸气de小男生 提交于 2019-11-28 19:07:25
/*--> */ /*--> */ 在 linux下很多地方都需要软连接,软连接其实就是 windows的快捷方式。 制作软连接需要ln 命令,命令格式为 ln -s targetfile linkfile 比如,如下命令 ln -s /www/abc.sh doabc 上面的命令会在当前目录下生成一个 doabc文件,这个文件是软连接,使用 ll查看当前目录下的文件时,这个文件会显示成 doabc->/www/abc.sh *的形式。 ln命令还可以制作硬链接,硬链接不常用,如果感兴趣请使用 ln --help参考帮助文档 来源: http://www.cnblogs.com/jymz/p/6171238.html

LINUX: Link all files from one to another directory [closed]

心已入冬 提交于 2019-11-28 15:18:52
I want to link ( ln -s ) all files that are in /mnt/usr/lib/ into /usr/lib/ There are lots of file, how to do it fast? :) ln -s /mnt/usr/lib/* /usr/lib/ I guess, this belongs to superuser, though. caf GNU cp has an option to create symlinks instead of copying. cp -rs /mnt/usr/lib /usr/ Note this is a GNU extension not found in POSIX cp . The posted solutions will not link any hidden files. To include them, try this: cd /usr/lib find /mnt/usr/lib -maxdepth 1 -print "%P\n" | while read file; do ln -s "/mnt/usr/lib/$file" "$file"; done If you should happen to want to recursively create the

MT【353】线性化夹逼

五迷三道 提交于 2019-11-28 09:32:27
若实数$a,b$满足$\dfrac{5}{2}a-\dfrac{3}{2}b-2\le\ln(a+b)+\ln(a-b)$, 求$5a-3b$=______ 注意到:$\ln x\le x-1(x>0)$ 则$\ln(a+b)+\ln(a-b)=\ln(\dfrac{1}{2}(a+b))+\ln2(a+b)$ $\le \dfrac{1}{2}(a+b)-1+2(a+b)-1=\dfrac{5}{2}a-\dfrac{3}{2}b-2 $ 故$\dfrac{5}{2}a-\dfrac{3}{2}b-2=\ln(a+b)+\ln(a-b)$当$a=\dfrac{5}{4},b=\dfrac{3}{4}$时等号成立 故$5a-3b=4$ 注:此处系数是待定出来的. 练习: 若$x,y$是实数,$e^{x+y+2}-3\le\ln(y-2x+1)+3x$,则$2x+y$的值为_____ 提示:$2x+y=-\dfrac{8}{3}$ 来源: https://www.cnblogs.com/mathstudy/p/11403421.html

数据挖掘十大算法(九):朴素贝叶斯 python和sklearn实现

大憨熊 提交于 2019-11-28 09:16:59
第三个算法终于算是稍有了解了,其实当你结合数据了解了它的实现原理后,你会发现确实很朴素。这里对朴素贝叶斯算法做一个介绍和总结,包括( 原理、一个代码示例、sklearn实现 ),皆为亲自实践后的感悟,下面进入正文。 原理: 首先我们需要了解概率论的一些简单知识: 最后推导出的就是贝叶斯公式,这里说一下我的感悟:上面的公式如果就这样不结合数据来看,是很容易理解的,我用了几分钟便了解了这个高中学过的东西。但是在我将它和实际数据之间联系起来时,却花了几个小时。毕竟得到一个公式只是基础,如果不能在数据上运用得当那也是无用武之地。下面就这个问题说一下: 朴素贝叶斯的原理: 根据一些先验概率计算Y变量属于某个类别的后验概率 先验概率: 是指现有数据根据以往的经验和分析得到的概率 后验概率: 事情已经发生,要求这件事情发生的原因是由某个因素引起的可能性的大小 一个通俗的理解: 你求出了你在百思图买了一双白鞋的概率,那么如何得知你买了一双白鞋而这双白鞋就在百思图的概率呢。 这就是利用先验概率来求得后验概率的问题,再拿一个数据说明(引入他人的): 上表中的信息反映的是某P2P企业判断其客户是否会流失(churn),而影响到该变量的因素包含年龄、性别、收入、教育水平、消费频次、支持。那根据这样一个信息,我该如何理解朴素贝叶斯的思想呢?再来看一下朴素贝叶斯公式: 从公式中可知

安装lrzsz

给你一囗甜甜゛ 提交于 2019-11-28 07:26:34
yum install lrzsz // 下载安装包 wget http://down1.chinaunix.net/distfiles/lrzsz-0.12.20.tar.gz tar -zxvf lrzsz-0.12.20.tar.gz cd lrzsz-0.12.20 // 编译 ./configure –prefix=/usr/local/lrzsz make make install // 建立软连接 ln -s /usr/local/lrzsz/bin/lrz /usr/bin/rz ln -s /usr/local/lrzsz/bin/lsz /usr/bin/sz https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=f5v2mcse 来源: https://www.cnblogs.com/mangolw/p/11398895.html

EM算法:入门案例

点点圈 提交于 2019-11-28 06:01:02
概率分布 4种实验结果 \(E_1\) \(E_2\) \(E_3\) \(E_4\) 记录它们发生的次数 \(y_1\) \(y_2\) \(y_3\) \(y_4\) 记录次数结果 125 18 20 34 4种结果发生的概率 \(\frac{1}{2}-\frac{\theta}{4}\) \(\frac{1}{4}-\frac{\theta}{4}\) \(\frac{1}{4}+\frac{\theta}{4}\) \(\frac{\theta}{4}\) 求 \(\theta\) 的估计值? 法 1:采用最大似然估计 \[L(\theta) = \frac{(y_1+y_2+y_3+y_4)!}{y_1! y_2! y_3!y_4!}(\frac{1}{2}-\frac{\theta}{4})^{y_1}(\frac{1}{4}-\frac{\theta}{4})^{y_2}(\frac{1}{4}+\frac{\theta}{4})^{y_3}(\frac{\theta}{4})^{y_4} = C\times (\frac{1}{2}-\frac{\theta}{4})^{y_1}(\frac{1}{4}-\frac{\theta}{4})^{y_2}(\frac{1}{4}+\frac{\theta}{4})^{y_3}(\frac{\theta}{4})^{y