HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Automated file creation
Operating System - HP-UX
1827885
Members
1453
Online
109969
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
03-26-2009 04:18 AM
03-26-2009 04:18 AM
Can anyone help with my query?
A host system is dependant on receiving an FTP of a file, but some days my system isn't used and therefore the file isn't created. I'm told I need to have a blank file ready to FTP if the system isn't used that day.
I need to do a find in a directory for files with .xmt extension and if the file doesn't exist i need to create a blank one.
Can anyone suggest a script to use, i'll then add it to the cron to run automatically
A host system is dependant on receiving an FTP of a file, but some days my system isn't used and therefore the file isn't created. I'm told I need to have a blank file ready to FTP if the system isn't used that day.
I need to do a find in a directory for files with .xmt extension and if the file doesn't exist i need to create a blank one.
Can anyone suggest a script to use, i'll then add it to the cron to run automatically
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2009 04:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2009 04:53 AM
03-26-2009 04:53 AM
Re: Automated file creation
Hi:
Why not something as simple as:
# FILE=/var/tmp/somefile;[ -f ${FILE} ] || touch ${FILE}
Regards!
...JRF...
Why not something as simple as:
# FILE=/var/tmp/somefile;[ -f ${FILE} ] || touch ${FILE}
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2009 05:09 AM
03-26-2009 05:09 AM
Re: Automated file creation
ls //*.xmt 2> /dev/null
if [ $? -ne 0 ];then
touch filename.xmt
fi
if [ $? -ne 0 ];then
touch filename.xmt
fi
Best wishes,
Ganesh.
Ganesh.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP