- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Printing to a File
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
Forums
Discussions
Discussions
Discussions
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
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
08-14-2002 06:10 AM
08-14-2002 06:10 AM
I want to create a Printer that will print to files in a Specific Directory. Say i have a Directory /test. when i give
#lp -dpr0 /etc/passwd. it should print to a file in the directory /test.
Can i do this through SAM?....
Thanks in Advance
George
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2002 06:19 AM
08-14-2002 06:19 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2002 06:24 AM
08-14-2002 06:24 AM
Re: Printing to a File
Try this way.
touch /tmp/file_printer
chown lp:bin /tmp/file_printer
chmod 644 /tmp/file_printer
lpadmin -pmyfileprinter -v/tmp/file_printer -mlaserjet
lpshut
lpsched
enable myfileprinter
accept myfileprinter
lp -dmyfileprinter /etc/passwd
Verify it printed..
cat /tmp/file_printer
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2002 06:30 AM
08-14-2002 06:30 AM
Re: Printing to a File
Create a virtual printer with:
# lpadmin -mprinter_name -vany_device_name -mdumb
# enbale printer
# accept printer
Now modify the printer script file under /etc/lp/interface and change the target (device_name) to the local file name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2002 05:46 AM
08-15-2002 05:46 AM
Re: Printing to a File
Create a filter script to output the file to your temp
directory with a unique name.
Extra points for the filter:
- Record meta info for the request (who, where, when).
- Clean out files older than x days.
- Limit space utilization in the directory.
- Set the file extension according to the file contents.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2002 07:40 AM
08-15-2002 07:40 AM
Re: Printing to a File
Did you solve the issue? I successfully tested the option which I told you on that day. Let me know if anything else ..
Sorry for answering late, but happy that you already got excellent answers.
later,
Shiju