Solved

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

Posted on 2011-03-06
3
490 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

895 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

15 Experts available now in Live!

Get 1:1 Help Now