Naming of directory problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Naming of directory problem
# 1  
Old 09-27-2010
Naming of directory problem

hi all
suppose in particular directory i have lots of directory supoose
201009 201010 201011 201012
now by mistake i have rename all these directory as
201009.bk 201010.bk 201011.bk 201012.bk

now how can i revert the changes back

pls help me regarding this
# 2  
Old 09-27-2010
Code:
for d in *.bk/; do
  mv -- "$d" "${d%.bk/}"
done

# 3  
Old 09-27-2010
thanx man it worked
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with naming the file

Hi, I have a folder that contains files abc.txt def.txt ....and so on Inside abc.txt, I have @<TRIPOS>MOLECULE 4|Chelerythrine|abcb11_earlyIdentification_Stronginhib_washed_ligprep|sdf|1|dock Inside def.txt, I have @<TRIPOS>MOLECULE... (6 Replies)
Discussion started by: rossi
6 Replies

2. What is on Your Mind?

Humorous naming

Dear all, We've been asked to submit names for our documentation system. It used to be the very dry ISDL (Information Services Documentation Library) The replacement is built on a Wiki-beastie but that doesn't help much with a name. I wondered about an acronym based on CRAFT, so I can... (1 Reply)
Discussion started by: rbatte1
1 Replies

3. UNIX Desktop Questions & Answers

Combining files with specific patterns of naming in a directory

Greetings Unix exports, I am facing some problems in combining files with different name patterns with a directory and I would appreciate if you can help me I have more than 1000 files but they follow a specific pattern of naming. e.g. 64Xtest01.txt They are divided into two sets of test and... (9 Replies)
Discussion started by: A-V
9 Replies

4. Shell Programming and Scripting

naming columns

i have a file staff.txt with contents tom|25|New York sims|40|London neyo|18|Moscow i want to label the column at the top, my output should be Names|age|city of birth tom|25|New York sims|40|London neyo|18|Moscow (4 Replies)
Discussion started by: blackzinga80
4 Replies

5. Shell Programming and Scripting

#file naming

hi all, Please advise at what circumstance those file will become -rwxr-xr-x 1 psa psa 1969088 Aug 18 2006 #libaa.sl -rwx------ 1 psa psa 2166784 Jul 25 2006 #libcrypto.sl.0.9.7 -rwx------ 1 psa psa 904040 Jul 25 2006 #libxxx.sl -rwx------ 1 psa ... (2 Replies)
Discussion started by: rauphelhunter
2 Replies

6. Shell Programming and Scripting

issue in naming a file

Hi, I want to create a file named 'abc(+1)' and append the data of file 'abc' to it. But getting error as unexpected'(' when i tried to use the following command. cat abc > abc(+1) Is there any other way to include brackets along with +1 in the file name? TIA. (3 Replies)
Discussion started by: vimalr
3 Replies

7. Shell Programming and Scripting

Directory inside directory problem

hii, I have to create a directory under the same directory with the date +%a extension like this BackupLocation=$BackupLocation/$BackupLocation$(date +%w) but the problem is --- if backuplocation is abc/dfg then accroding to the above statement it would be abc/dfg/abc/dfg5 but i... (6 Replies)
Discussion started by: namishtiwari
6 Replies

8. Programming

Naming a socket

Im not very experienced with C so this is probably a basic question. I have a script that opens up 5 sockets, it then runs through a loop and on a given event reconnects to the relevant socket and sends some data. The socket to be reconnected to is kept track of with a 'count' variable. The sockets... (5 Replies)
Discussion started by: geester
5 Replies

9. Linux

How to discover what naming services are available

Hello All, A number of UNIX platforms currently bundle clients for the NIS, NIS+, and LDAP services. I'd like to know how to discover what naming services are available. E.g., results : ============================= URL: service:naming-directory:nis://192.168.1.100/eng.wiz.com ... (0 Replies)
Discussion started by: test111111
0 Replies

10. UNIX for Advanced & Expert Users

Controller Naming

Hello all, How does the Solaris identifies the controller subscript ? ( like c0txdxs0 or c1txdxsx ?? ) I have a unix box ( Ultra 30) running with 2.5.1. When I connected an external hard disk to the on-board scsi port, it got identified as c0t1dxsx... (... (1 Reply)
Discussion started by: shibz
1 Replies
Login or Register to Ask a Question