To Print a text file in Ubuntu Using cat command

Hi to all.

To print a text file in Ubuntu to a printer. We can use simply cat command for that. We don’t need printer driver files. The command used to print the file is

sudo cat sample.txt > /dev/usb/lp0

Here we want to run the above mentioned command as root user. Also the printer must be connected in USB port.

Then we can use this command. Other wise we want to see any other lpt ports is connected.

Thats it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s