the diary about awk scp in linux

本文介绍了两种常用的Linux命令:awk和scp。通过示例详细解释了如何使用awk进行文本处理,包括提取特定字段和筛选记录。同时,文章还介绍了如何使用scp在本地和远程机器之间安全地传输文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

talk awk and scp

the awk

the awk is like cut , but it is more powerful , say you have a text file named "haha" , inside it you have structure like this:
asha haha 1
peter wawa 2
melme papa 3

so you can get the only first field using: awk "{print $1}" haha.
if you only wanna get the record whose number greater than 2,ie melme papa 3, using :awk "$3>2 {$1':'$2'-'$3}" haha

 the scp

scp equals secure copy,it's function like ssh(secure shell),helps you transfer data between remote and local machine.it's usage : scp ~/some.jpg username@187.167.17.18:~/haha.jpg.(from local to remote)
or scp usrname@187.167.17.18:~/haha.jpg ~/some.jpg(from remote to local)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值