General :: Unix Command To Send File To Printer?
Mar 28, 2010Is it true that the UNIX commands to send a file to a printer for printing are system-dependent?
View 2 RepliesIs it true that the UNIX commands to send a file to a printer for printing are system-dependent?
View 2 Repliesin the middle of script, i need to send the output of (send command on line 8) to a file
#!/usr/bin/expect
spawn telnet 172.20.64.133
expect "ENTER USERNAM <"
[cod]....
i treid the below on line 8 :
1- send "show command;
" > logfile.txt : gives an error extra character after the "
2- logsave logfile.txt 'send "show command;
" ': error invalid command
3- i simply tried to send the output of the whole script to file logsave /home/logfile ./script : seems that logsave work under root only
4- ./script > logfile : the problem with this is that the output of echo or (read "enter your id") command will not be displayed on the screen (actually nothing will be displayed, i have to open the log file to see the output). is there any way to save the log of the "send" ? or to save the log of the complete script without hiding the output on the screen?
I am trying to send data through a USB port to a printer which can recieve text file. Now to send the data to the printer I am doing echo "Hello World" > /dev/usb/lp0
but the data doesnt seem to be sent to the printer because I have an analyzer to monitor the data sent to the printer. Is there anything else which I need to do
i want to send mail from unix mail command to my yahoo-id with attachment, but i want to receive it as attachment.
View 1 Replies View RelatedI've got a Debian Squeeze computer on which the graphics have packed up, but the terminal in single user mode work perfectly fine.
There are a few files on this Debian computer that I want to transfer off, to a networked computer, but I have no idea how to do this.
The destination computer is a freshly re-setup Mandriva install, without (as yet) samba. I don't think it's necessary though. The Mandriva install works fine, has graphics, etc, but can't see the Debian Squeeze computer on the network, possibly because it's in single user mode, thus prompting the problem of how to transfer the files, using only a command line.
I tried to run % mvdir earlier and it said command not found. I then ran a search for it and still not found.Is there a place I can download the script for the command, and is there any information I should know post-download to get it to work?
View 4 Replies View RelatedWhat exactly is the use of dmesg?
View 3 Replies View RelatedI am very new to Linux and Unix. Is there a command list which indicates the UNIX command equivalents also?
View 5 Replies View RelatedI know the 'history' command give me a list of the commands I have typed into the Unix terminal.
How do I see the command history for all of the users currently logged onto the system?
This question may be silly and super easy for linux connaisseurs, but I was just wondering, for instance, I want to use the >find command to search for a file and send the results to a text file
View 5 Replies View RelatedI'm pretty sure this is super simple, but I've searched and searched and for the life of me I can't find any info on how to limit the columns that display in the interactive top program with arguments passed from the command line. I recall seeing something formatted like this ...
~/top -f (kdx)
Which would only show the %CPU, UID, program name fields/columns. I'd like to display the results in a really narrow terminal window on the right side of my desktop.
I hope to add a wrapper script for the command with different parameters. For example, for any Unix command or script, like below:
command.sh -s p1 -o p2 -q p3
or
command.sh
Probably we could do as this way
cat wrapper
$1 $2 $3 $4 $5 $6 $7 | tee test.log
(assume it has 0 to 6 parameters)
and use it like
wrapper command.sh -s p1 -o p2 -q p3
wrapper command.sh
It is a little ugly to list all fixed parameter as above, do we have better code to handle various parameters?
I want to visit a url but this shall be invoked by a shell script. Anyone let me know the command to hit a url in unix.
View 5 Replies View RelatedWhen looking for a certain word or phrase in the man page of linux command, one can type '/' followed by the word/phrase to search for it. What I'd like to be able to do is to search for the next occurrence of the word/phrase without having to type it out again. Kinda like when you use 'ctrl+f' in a browser to search for a word, and then press 'enter' to find the next occurrence of that word.If this is possible to do, how do I do it?
View 2 Replies View RelatedI am trying to ssh into my server from the command-line without including the username in the url. I do not want it to send any username, as it currently takes the active account and sends that as user.ex:
ssh server.com -> (doesn't send default username)
instead of [URL] I would want to input username directly into the server, just like it is done using putty on windows. he wants to be prompted for a username, rather than having to provide one when connecting - but I don't really see the utility in such a thing. - birryree Sep 8 at 17:41
Unix command that allows to know which process is running on processor core?
View 2 Replies View RelatedSending computer runs linux. Recieving runs OS X.
View 2 Replies View RelatedI'm trying to send files from a Unix server using http/curl to a Linux webserver running Apache. I get the following PUT error message when and the file does not send:
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method PUT is not allowed for the URL
What are the directories and files in Unix file-system that has default user permission set. For eg. home directory of a user can't be seen by the other users on the system without his permission. In the same way what are the other directories that by default has user permission set at the time user account has opened. Eg. /etc,/bin or what
View 3 Replies View RelatedWe planned to migrate data files in Unix to Linux. The file in Unix is in big endian data format where is linux is configured as little endian byre structure. This is causing problem in data computation.
How data can be ported to linux ( converting big endian to little endian).
How linux configured can be configured for big endian byte structure.
I sometimes get confused by the varying command line options I need to run common Unix archiving and compression software (e.g. gzip, bzip2, zip, tar).
Is there a program out there that can just Do What I Mean for common cases? For example:
Solaris is the os used. I want to copy files from UNIX Machine to windows network drive.I know smbclient,ftp can be used. But is there any other best option i can use?
View 2 Replies View Relatedthe below tag is in the xml file. Now i want to find and extract the value of application name test1 and test2 one by one in the unix shell script. how to do this
<application name="test1">
</application>
<application name="test2">
[code]...
How to Look at history file in unix shell for a user, find 5 most often used commands.
View 5 Replies View RelatedI am tring to get the MAC address from windows xp and remove it from a file on a unix box. This is what I have so far:
getmac | plink.exe -ssh -pw "my pw" -noagent -m commands.txt root@192.168.1.82
commands.txt
cd /root
tr '-' ':' | tr -d '[:blank:]'
now this is what I get
10:9A:CD:5F:04:8ADeviceTcpip_{5A79FE8D:F227:4B91:9459:2701486C5D94}
All I need is the MAC. Everything after Device* is not needed.The file is /var/db/captiveportal_mac.db. The MAC address are listed like this.
MAC1
MAC2
MAC3
MAC4
MAC5
is there a way to view the Unix permissions for a file under Windows?
View 1 Replies View RelatedI have a minecraft server running as a daemon. When you run it normally (not as a daemon), you can type commands into the console. How can you get to the console so I can send it commands while it's running as a daemon?
View 1 Replies View RelatedWe all know how to kill multi process but if we want to send different signals to different process like to stop,-9,to hungup simultaneously at the same time then how we will do it,is there any particular command to do it.
View 1 Replies View Relatedhope you will know the net send command of windows.in the same way we are working on linux red hat 5.0 we want to know the equivalent command of net send for linux if any body know then please tell us? we are here only when we not found on google so please do not give the suggestion of searching on google.
View 5 Replies View RelatedI'm currently writing a C++ application to manage some screen functions in Debian(server).
However this issue have bothered me for 2 days now...
What I want to do is to send a command to an attached screen which is running.
Used the following command: Code: screen -S screenwindow So I send a command with the -X parameter, which works just fine... Code: screen -S screenwindow -X stuff yes The command I want to send is "yes" and it does appear in my screen window when I attach it.
But the problem is that I need it to submit it... well I need to press "enter" and I've been looking everywhere on how to do that.
Because right now it hangs on a line like this: Code: Something here, do you want bla bla: yes Obviously I could just press enter myself, but the problem is that it's running as a deamon and but it is supposed to do this all by itself .
So are there any way I can submit it?