HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: FTP results send to root's email
Operating System - HP-UX
1834921
Members
2853
Online
110071
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
01-28-2004 06:36 AM
01-28-2004 06:36 AM
I have a script that FTPs some files archive files to another server. The problem I have is that it sends a very long list of these files and the entire FTP process gets recorded in root's email. I do not want it to go there, can anyone tell me what I can add to avoid this from happening (like how to send it to /dev/null?):
FTP portion of the script.
++++++++++++++++++++++++++++++++++++++++++
#FTP the compressed archives
echo "`date` Start FTP of Oracle archive files to ${HOST1} " >> ${LOGFILE}
ftp -n ${HOST1} <<-EOF
user ${USER} ${PASS}
cd ${RMTARCHDIR}
binary
verbose
mput arch*gz
bye
EOF
++++++++++++++++++++++++++++++++++++++++++
Thanks for any help!
FTP portion of the script.
++++++++++++++++++++++++++++++++++++++++++
#FTP the compressed archives
echo "`date` Start FTP of Oracle archive files to ${HOST1} " >> ${LOGFILE}
ftp -n ${HOST1} <<-EOF
user ${USER} ${PASS}
cd ${RMTARCHDIR}
binary
verbose
mput arch*gz
bye
EOF
++++++++++++++++++++++++++++++++++++++++++
Thanks for any help!
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2004 06:38 AM
01-28-2004 06:38 AM
Re: FTP results send to root's email
Maybe:
ftp -n ${HOST} <<-EOF >/dev/null 2>&1
Mic
ftp -n ${HOST} <<-EOF >/dev/null 2>&1
Mic
What kind of a name is 'Wolverine'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2004 06:42 AM
01-28-2004 06:42 AM
Solution
Hi,
You can take out "verbose" from your ftp commands.
You can also redirect the output messages to /dev/null as below. Here both stdout and stderr go to /dev/null. But you can adjust it to however you want.
ftp -n ${HOST1} << EOF > /dev/null 2>&1
..
..
EOF
To redirect standard out messages to a log file but errors to /dev/null
ftp -n ${HOST1} << EOF >> $LOGFILE 2>/dev/null
The other way
ftp -n ${HOST1} << EOF > /dev/null 2>$LOGFILE
-Sri
Should work
-Sri
You can take out "verbose" from your ftp commands.
You can also redirect the output messages to /dev/null as below. Here both stdout and stderr go to /dev/null. But you can adjust it to however you want.
ftp -n ${HOST1} << EOF > /dev/null 2>&1
..
..
EOF
To redirect standard out messages to a log file but errors to /dev/null
ftp -n ${HOST1} << EOF >> $LOGFILE 2>/dev/null
The other way
ftp -n ${HOST1} << EOF > /dev/null 2>$LOGFILE
-Sri
Should work
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2004 07:00 AM
01-28-2004 07:00 AM
Re: FTP results send to root's email
Great, thank you both!
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP