我有包含多个文件的文件夹。我想更改名称中的表达式。
例如:
find /path/ -type f -name '*0050ABC_01032013*'
Run Code Online (Sandbox Code Playgroud)
给我一个这样的输出:
/path/0050ABC_01032013/t1mri/T1pre_2013-3-1/default_analysis/segmentation/mesh/0050ABC_01032013_Rhemi.gii.minf
/path/0050ABC_01032013/t1mri/T1pre_2013-3-1/default_analysis/segmentation/Lcortex_0050ABC_01032013.nii
/path/0050ABC_01032013/t1mri/T1pre_2013-3-1/default_analysis/segmentation/Lgrey_white_0050ABC_01032013.nii.minf
/path/0050ABC_01032013/ct/CTpost_2013-3-1/registration/CT-0050ABC_01032013_CTpost_2013-3-1_TO_Scanner_Based.trm
Run Code Online (Sandbox Code Playgroud)
我想将 0050ABC_01032013 更改为 0044CBA_01011901。
我试过这个:
find /path/ -type f -name '*0050ABC_01032013*' -execdir rename s/\.\/(w+)0050ABC_01032013(w+)$/$10044CBA_01011901$2/' {} \;
Run Code Online (Sandbox Code Playgroud)
但它不起作用。我该怎么办?
我经常通过sftp协议连接到数据库,我通过做 get -r
是否有任何选项可以跳过我计算机上的所有现有文件?我试过 get -r --overwrite 但它不起作用。(我知道我可以将我的文件设置为只读,但我想找到更好的方法)。
我在 ubuntu 16.04 上有一台笔记本电脑,但无法配置以太网卡……我没有 wifi 和以太网连接……我相信它是 atheros e2600,但我不确定。
当我输入 modinfo alx 我有这个:
filename: /lib/modules/4.4.0-31-generic/kernel/drivers/net/ethernet/atheros/alx/alx.ko
license: GPL
description: Qualcomm Atheros(R) AR816x/AR817x PCI-E Ethernet Network Driver
author: Qualcomm Corporation, <nic-devel@qualcomm.com>
author: Johannes Berg <johannes@sipsolutions.net>
srcversion: 25B6ABE36E6CB50C1A7E6DF
alias: pci:v00001969d000010A0sv*sd*bc*sc*i*
alias: pci:v00001969d000010A1sv*sd*bc*sc*i*
alias: pci:v00001969d00001090sv*sd*bc*sc*i*
alias: pci:v00001969d0000E0A1sv*sd*bc*sc*i*
alias: pci:v00001969d0000E091sv*sd*bc*sc*i*
alias: pci:v00001969d00001091sv*sd*bc*sc*i*
depends: mdio
intree: Y
vermagic: 4.4.0-31-generic SMP mod_unload modversions'
Run Code Online (Sandbox Code Playgroud)
如果我做 lspci -nn 我有这个:
02:00.0 Network controller [0280]: Inter Corporation Device [8086:24fb] (rev 10)
03:00.0 Ethernet controller [0200]: Qualcomm Atheros Device [1969:e0b1] (rev 10)
Run Code Online (Sandbox Code Playgroud)
我已经下载了 …
16.04 ×1
atheros ×1
bash ×1
batch-rename ×1
command-line ×1
drivers ×1
ethernet ×1
find ×1
networking ×1
rename ×1
sftp ×1