Solved

find . -name "*.otl-" -exec mv \{} attrib.otl \;

Posted on 2011-03-06
3
488 Views
Last Modified: 2012-05-11
what will above command do ?
0
Comment
Question by:aashee
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
Tintin earned 250 total points
ID: 35048935
It will find any file from your current directory downwards that end in .otl- , eg:

file.otl-

and then renames that file to attrib.otl

0
 
LVL 13

Assisted Solution

by:Superdave
Superdave earned 250 total points
ID: 35052279
Hopefully attrib.otl is a subdirectory, in which case it will move those files into that subdirectory.  Otherwise it would rename everything to one filename and it'd delete all but the last one it finds.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 35055121
That's a very good point Superdave.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now