The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Change All File Names in a Directory
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Change All File Names in a Directory
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
01-21-2008
thana
Registered User
Join Date: Jan 2008
Posts: 55
Try this
[code ]
#!/bin/bash
dir="path name"
i=0
for filename in `ls -1t $dir/`
do
i=`expr $i + 1`
mv $dir/$filename $dir/ex$i
done
[code ]
thana
View Public Profile
Find all posts by thana
Find thana's past nominations received
Find thana's present nominations given