博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
遍历目录下的所有文件夹和文件,为指定文件改名
阅读量:4162 次
发布时间:2019-05-26

本文共 227 字,大约阅读时间需要 1 分钟。

find . -name '原文件名' -printf %h\\n | xargs -i{} mv {}/源文件名 {}/目标文件名

注释:

-printf 是find命令中格式化输出的语句,其中%h参数可获取文件所在目录结构

举例:

想将当前目录及其子目录下的“abc.txt”替换为“123.bat”

find . -name 'abc.txt' -printf %h\\n | xargs -i{} mv {}/abc.txt {}/123.bat

转载地址:http://pjixi.baihongyu.com/

你可能感兴趣的文章
Virtual Worlds as Proxy for Multi-Object Tracking Analysis
查看>>
Multi-view People Tracking via Hierarchical Trajectory Composition
查看>>
Online Multi-Object Tracking via Structural Constraint Event Aggregation
查看>>
The Solution Path Algotithm for Identity-Aware Multi-Object Tracking
查看>>
Groupwise Tracking of Crowded Similar-Appearance Targets from Low-Continuity Image Sequences
查看>>
CDTS: Collaborative Detection, Tracking, and Segmentation for Online Multiple Object Segmentation
查看>>
Deep Network Flow for Multi-Object Tracking
查看>>
Multiple People Tracking by Lifted Multicut and Person Re-identification
查看>>
Multi-Object Tracking with Quadruplet Convolutional Neural Networks
查看>>
关于多目标跟踪的一点理解
查看>>
Learning by tracking:Siamese CNN for robust target association
查看>>
MUSTer:Multi-Store Tracker:A Cognitive Psychology Inspired Approach to Object Tracking
查看>>
Understanding and Diagnosing Visual Tracking Systems
查看>>
Multiple People Tracking by Lifted Multicut and Person Re-identification
查看>>
Visual Tracking Using Attention-Modulated Disintegration and Integration
查看>>
Action-Decision Networks for Visual Tracking with Deep Reinforcement Learning
查看>>
Multiple Object Tracking with High Performance Detection and Appearance Feature
查看>>
深度学习入门(上)-第一章 必备基础知识点
查看>>
ubuntu unzip解压时提示错误 解决方法
查看>>
sprintf函数的说明
查看>>