Insufficient permissions to save or print

Joel Oliver joelol75 at
Thu May 21 21:04:52 BST 2009

Steven Vollom wrote:
>> I just ran the following commands, then edited them so that they lined up, and 
>> wanted to print, as well as, save them.  I was refused with the 'Subject:' 
>> statement:
>> steven at Yeshua:~$ df -Th
>> steven at Yeshua:~$ sudo fdisk -l
>> steven at Yeshua:~$ mount

Here's some quicker ideas:

To print out the output of each command on a seperate page:

df -Th|lpr&&sudo fdisk -l|lpr&&mount|lpr

To print the output all on one page: (This command is one line)

cd&&df -Th>print.txt&&sudo fdisk -l>>print.txt&&mount>>print.txt&&lpr 
print.txt&&rm print.txt

Looks like a bunch of gook, but it works (I tested 'em)

The second command works as follows: First it changes to your home 
directory (/home/steve) to make sure you have write permissions, then 
redirects the output of df -Th to a new text file called print.txt (If a 
file called print.txt already exists it will be overwritten), then 
redirects the output of sudo fdisk -l and appends it to print.txt, then 
does the same with mount, then pipes the listing of print.txt to the 
line printer (lpr) then finally cleans up by removing the print.txt 
file.  If you wanted to keep this text file, just remove the "&&rm 
print.txt"  off the end.

There's probably a way to do this without creating a file at all using a 
fifo, but there's about 1000 different ways to do the same thing in linux

You just need to watch your characters as the pipe command is not a 
number one nor a lowercase letter "L" but is the shifted backslash 

Any time you want to dump the output of a command to the printer instead 
of the screen, just pipe it to lpr!  need a nice directory listing?  ls 
-lha|lpr does the trick. This is great as you don't even need X running.

Hope this helps


More information about the kubuntu-users mailing list