linux杂记(报错排查、技巧等)

按行数分割大文件

split -l 5000(行数) -a 5(增加文件名上限) 123.txt(文件名) new_(缺省文件名)

 

wget多线程方法:

#!/bin/bash cat ./hy.txt | while read line do wget -c -r $line done

 

curl判断文件大小

curl -sI $URL | grep Content-length | awk '{print $2}'

 

查找文件大小并删除(查找大于100M的文件并删除)

find . -size +100M | xargs rm

 

aria2批量下载文件:

aria2c -c -i 应用下载链接.txt -d 文件夹

 

mac中安装kali虚拟机无法上网

选择nat模式联网

如果扔无法上网,查看网卡配置文件/etc/network/interfaces

auto lo # auto表示开机启动该网卡设备 
iface lo inet loopback 

auto eth0 # 使用dhcp分配地址 
iface eth0 inet dhcp 
iface eth0 inet6 auto 

auto eth1 # 使用静态地址
iface eth1 inet static a
    ddress 192.168.1.2/24 
    gateway 192.168.1.1 

iface eth1 inet6 static 
    address fec0:0:0:1::2/64 
    gateway fec0:0:0:1::1

查看eth0网卡是否启动,如果没有相关记录,则修改添加,之后重启网卡服务即可:

service networking restart

或者重启某个网卡

ifdown eth1 ifup eth1

 

安装flash

sudo apt-get install flashplugin-nonfree

 

在Kali 2018中默认安装了Python2、Python3,但是默认只可以使用pip2,pip3无法使用,解决操作如下:

apt-get update

apt-get install python3-pip

pip3 -h

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值