cp文件计数
发表于|更新于|linux
|浏览量:
cp文件计数
1 | #!/bin/bash |
文章作者: 火苗
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 IT技术记录小站!
相关推荐

2023-03-18
linux出现找不到lib*.so
使用自己编译的so出现:error while loading shared librarieserror while loading shared libraries: lib*.so.1: cannot open shared object file: No such file 新建/etc/ld.so.conf.d/mylib.conf 1sudo vim /etc/ld.so.conf.d/mylib.conf 写入自己编译的lib所在路径(以boost为例) 1/home/flame/boost_1_76_0/stage/lib 保存后执行sudo ldconfig

2023-07-25
initrd的init中读取grub参数
方法/proc/cmdline文件中是grub的命令行参数 12345678910for x in $(cat /proc/cmdline); do case $x in # "..." # 省略 # 读取mysystemname mysystemname=*) MYSYSTEMNAME=${x#mysystemname=} ;; # 结束 esacdone 例子grub.cfg 123456menuentry "ubuntu vmlinuz-5.15.0-76" { insmod ext2 insmod part_gpt linux /boot/vmlinuz root=(hd0,1) vdisk=/dev/sda2 sroot=/dev/nbd0p1 mysystemname=ubuntu initrd /boot/initrd-5} 123456789101112for x in $(c...

2019-11-26
Centos配置公钥登陆
1、生成密钥对1ssh-keygen -t rsa -b 2048 参数说明附录1-t 加密算法-b bit位数 2、切换到将要使用key登陆的用户部署公钥切换用户1su admincd到~1cd ~创建目录并修改权限。12mkdir .sshchmod 700 .ssh配置公钥,将刚才生成的公钥复制到.ssh下并改名authorized_keys,修改权限为600123cp ~/test/rsa_id.pem.pub .ssh/mv .ssh/rsa_id.pem.pub .ssh/authorized_keyschmod 600 .ssh/authorized_keys下载私钥到本地 3.配置ssh切换到root编辑/etc/ssh/sshd_config1vim /etc/ssh/sshd_config找到#PermitRootLogin yes修改为PermitRootLogin no(禁止root登陆) 找到#RSAAuthentication yes修改为RSAAuthentication yes(启用RSA认证) 找到#PubkeyAuthentication y...

2023-07-25
initramfs打包模块进initrd.img
initramfs打包模块进initrd.img查看模块1modprobe --show-depends nbd nbd模块名称 模块存在会显示路径 1insmod /lib/modules/5.15.0-76-generic/kernel/drivers/block/nbd.ko 增加模块修改/etc/initramfs-tools/modules 12345678910111213141516171819202122232425# List of modules that you want to include in your initramfs.# They will be loaded at boot time in the order below.## Syntax: module_name [args ...]## You must run update-initramfs(8) to effect this change.## Examples:## raid1# sd_modnbdnet # 网络模块# squashfs# ahci# libahci# usb...

2023-11-03
ubuntu配置vnc服务
ubuntu配置vnc服务切换到root 安装服务1apt install -y tigervnc-scraping-server 配置vnc密码1vncpasswd 123Password:Verify:Would you like to enter a view-only password (y/n)? n 启动服务直接启动1x0vncserver -rfbauth "/root/.vnc/passwd" 注册成服务下面的代码保存成vnc.sh并执行.(给所有用户增加vnc服务) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748vnc_users=`ls /home`vnc_users="${vnc_users}"for uv in ${vnc_users}do if [ ! -d "/home/${uv}/.vnc" ]; t...

2019-04-16
samba配置
说明参考https://www.lisenet.com/2016/samba-server-on-rhel-7/ 安装yum install -y samba samba-client 服务systemctl enable smb nmb 加防火墙12firewall-cmd --permanent --add-service=sambafirewall-cmd --reload 安装工具yum -y install policycoreutils-python.x86_64 创建共享目录mkdir /srv/samba_group 配置权限123groupadd devopschgrp devops /srv/samba_groupchmod 2775 /srv/samba_group 检查一下默认的SELinuxls -dZ /srv/samba_* 将samba_share_t上下文类型应用于组共享semanage fcontext -a -t samba_share_t "/srv/samba_group(/.*)?" 让samba可以创建新的主目录s...
公告
每天都有一个好心情


