- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ftp rename multiple files beginning with a lea...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 02:32 AM
тАО05-07-2010 02:32 AM
ftp rename multiple files beginning with a leading .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:13 AM
тАО05-07-2010 03:13 AM
Re: ftp rename multiple files beginning with a leading .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:18 AM
тАО05-07-2010 03:18 AM
Re: ftp rename multiple files beginning with a leading .
Or you can rename with wild card character after coping the files
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:23 AM
тАО05-07-2010 03:23 AM
Re: ftp rename multiple files beginning with a leading .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:27 AM
тАО05-07-2010 03:27 AM
Re: ftp rename multiple files beginning with a leading .
you can use this ... this will do the trick .. but you have to run it from that directory where you have these files
for i in ` find . -name ".*xml" -print `
do
new_name=` echo $i | sed 's_/._/_g' `
mv $i $new_name
done
gudluck
prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:27 AM
тАО05-07-2010 03:27 AM
Re: ftp rename multiple files beginning with a leading .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:37 AM
тАО05-07-2010 03:37 AM
Re: ftp rename multiple files beginning with a leading .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:39 AM
тАО05-07-2010 03:39 AM
Re: ftp rename multiple files beginning with a leading .
[root@vm1 files]# ls -la
total 36
drwxr-xr-x 2 root root 4096 May 4 11:56 .
drwxrwxrwt 11 root root 4096 May 4 11:43 ..
-rw-r--r-- 1 root root 0 May 4 11:56 .239622018_001368083_4E1_20100506080500000_TP217.xml
-rw-r--r-- 1 root root 0 May 4 11:56 349622018_001368083_4E1_20100506080500000_TP217.xml
-rw-r--r-- 1 root root 0 May 4 11:43 .639622018_001368083_4E1_20100506080500000_TP217.xml
-rwxr-xr-x 1 root root 105 May 4 11:47 x.sh
[root@vm1 files]# ./x.sh
[root@vm1 files]# ls -la
total 36
drwxr-xr-x 2 root root 4096 May 4 11:56 .
drwxrwxrwt 11 root root 4096 May 4 11:43 ..
-rw-r--r-- 1 root root 0 May 4 11:56 239622018_001368083_4E1_20100506080500000_TP217.xml
-rw-r--r-- 1 root root 0 May 4 11:56 349622018_001368083_4E1_20100506080500000_TP217.xml
-rw-r--r-- 1 root root 0 May 4 11:43 639622018_001368083_4E1_20100506080500000_TP217.xml
-rwxr-xr-x 1 root root 105 May 4 11:47 x.sh
[root@vm1 files]# pwd
/tmp/files
[root@vm1 files]# cat x.sh
for i in ` find . -name ".*xml" -print `
do
new_name=` echo $i | sed 's_/._/_g' `
mv $i $new_name
done
[root@vm1 files]#
Gudluck
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:43 AM
тАО05-07-2010 03:43 AM
Re: ftp rename multiple files beginning with a leading .
copy these files to another directory
remove the leading "."
then mput to windows server
once mput completes, remove the copied files
Gudluck
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2010 03:43 AM
тАО05-07-2010 03:43 AM
Re: ftp rename multiple files beginning with a leading .
ftp> !/usr/bin/1dotmove
for: Command not found.
do: Command not found.
i: Undefined variable.
i: Undefined variable.
new_name=: Command not found.
new_name: Undefined variable.
ftp> quit