General :: Fetch File From There (which Is .tar.gz) And Pass It Directly To Tar Command?

Jun 25, 2010

I have access to backup server via rsync protocol (only rsync, nothing else). Now, I want to fetch file from there (which is .tar.gz) and pass it directly to tar command, without saving the archive in local filesystem. To visualize, with ssh access I could:

ssh remote_host cat backup.file.tar.gz | tar xzf - And I will get uncompressed backup locally, without actually storing .tar.gz on local machine. Is it possible to achieve when using rsync?

View 4 Replies


ADVERTISEMENT

General :: Pass A File That Changes Name To Another Command In Bash?

Jun 9, 2011

I frequently use wget to download tarballs and zip files from the web, then either untar then or gunzip them. I do:

Is there a way for me to automatically pass the zip file to tar or unzip WHILE wget-ting?

In pseudocode: wget google.com/somfile.zip && unzip

View 3 Replies View Related

General :: Pass A Paramter To A List Of Command In Another File?

Apr 19, 2010

I am attempting to write my first ever script from scratch and making some progress.

My first shell script file executes a list of commands contained in a second file. I need to pass a parameter to this command file how do I do this?

View 7 Replies View Related

General :: Apt-get Install Command Is Not Able To Fetch Packages From Ubuntu Repository?

May 8, 2010

I have been working on Redhat family of distributions since past 1 year. Two days back I installed Ubuntu 10.04 on my laptop. I am novice to Package Management in Debian family of Linux distributions. My Internet connection is working fine. But I am not able to install any package with apt-get package Manager. Here is my /etc/apt/sources.list file

Code:

deb http://in.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid main restricted
deb http://in.archive.ubuntu.com/ubuntu/ lucid-updates main restricted

[code]....

View 12 Replies View Related

General :: How To Pass Argument From Command Prompt?

Jan 5, 2011

when I am running the script below,it performs on whatever logfile u type ,i.e, ./scriptname logfilename.But how do I convert it into a function and then call it from another script.I mean how do I prompt the user to enter a logname and then capture the name in the function and when calling this function from another script how do I pass the parameter.

View 3 Replies View Related

General :: Pass Response As Command Parameter?

Mar 10, 2010

I have a backup schedule running a full backup everyday. I'm using webmin to manage these backup now. The problem is when the dump command sends a prompt asking if we want to rewrite the tape, Webmin does not display this prompt and we end up having to terminate the backup -> erase the tape(which takes a long time) and then run the backup again.I was wondering if there is a technique that could be used to pass "Yes" as a parameter to the dump command, much like in windows? or if there is a more efficient way of getting this done.

View 2 Replies View Related

General :: Pass Carriage Return To A Command?

Feb 18, 2011

How can I pass carriage return to a command. I am writing a shell script whcih generates ssh key pair. It ask for input from user three times. I want to pass carriage return (ie. press Enter button) to this command. Is tehre any way

View 8 Replies View Related

General :: Pass Multiline Output Of A Command Into 'date -j'

Mar 3, 2011

I am doing some NSCA log parsing and I want to get an output like this:

2011-Feb-18:11:00:07
2011-Feb-18:11:00:07
2011-Feb-18:11:00:07
2011-Feb-18:11:00:08
2011-Feb-18:11:00:08

[Code]....

I have tried this, but it treats the entire output as a single line, then plops a timestamp on the end (I think):

Code:

sort -b -k4.9,4.12 -k4.5b,4.7Mb -k4.2,4.3 -k4.14,4 foo.log| date -j -f "%Y-%b-%d:%T" "+%s" "`awk -F '[ [/:]' '{print $7"-"$6"-"$5":"$8":"$9":"$10}'`"

View 1 Replies View Related

General :: Pass Multiline Output Of A Command Into 'date?

Mar 3, 2011

I am doing some NSCA log parsing and I want to get an output like this:

2011-Feb-18:11:00:07
2011-Feb-18:11:00:07
2011-Feb-18:11:00:07

[code]...

View 6 Replies View Related

General :: Why Use Patch Files Based Upon Different When Can Directly Overwrite The Old File With The New File

May 29, 2010

i want to know why do we need to patch files based upon diff when we can directly overwrite the old file with the new file.

View 4 Replies View Related

General :: Sending Messages Directly At Command Prompt Of Client?

Jun 11, 2010

Can I make my messages directly appear at client from server? Normally we type
tailf /var/log/messages
to see messages sent by other machine. So can I send my messages directly at command prompt?

View 2 Replies View Related

General :: Bash : Pass Command Line Arguments Containing Special Characters?

Jul 14, 2010

I've written myself a linux program "program" that does something with a regular expression. I want to call the program in the bash shell and pass that regular expression as a command line argument to the program(there are also other command line arguments). A typical regular expression looks like "[abc]_[x|y]".Unfortunately the characters [, ], and | are special characters in bash. Thus, calling "program [abc]_[x|y] anotheragument" doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.?

(Calling program "[abc]_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)

View 7 Replies View Related

General :: Bash: How To Pass Command Line Arguments Containing Special Characters

Jun 24, 2011

I've written myself a linux program "program" that does something with a regular expression. I want to call the program in the bash shell and pass that regular expression as a command line argument to the program (there are also other command line arguments). A typical regular expression looks like "[abc]_[x|y]". Unfortunately the characters [, ], and | are special characters in bash. Thus, calling "program [abc]_[x|y] anotheragument" doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.? (Calling program "[abc]_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)

View 8 Replies View Related

General :: Pass Option To LILO In Order To Have Script / Command Executed At / After Boot

Aug 28, 2009

I have one distro installed, LILO as the boot loader, and i wonder if it's possible to duplicate the lilo entries with an option which executes some script or command during, or after the boot.Actually, i installed a Slackware + autolaunching virtual machine, but i have two VM, so i need to autolaunch one of them. May i choose it from the very beginning ?

View 9 Replies View Related

General :: WPA2 - NetID And Pass - Wireless Network From Wicd And/or Command Line

Sep 23, 2010

The university I go to uses a WPA2 wireless network that requires a netID and password to connect too. I installed wicd but I can't seem to connect to this network, is there a way to add this functionality to wicd, and if so, how do I do that (links to a how-to or guide would be nice, I've yet to find one).

Also, I spend most of my time on campus in the command line, so I'd like to know if there is a way to use command line utilities to connect to this network (again, a guide or how-to would be nice)

I can get online through my fedora live USB just fine (w/ network manager) but I'd rather get on directly from slackware.

View 3 Replies View Related

General :: Pass File Content Through URL Using Shell Script?

Jul 16, 2011

I am calling a URL from shell script and passing few argumants,Here i have to pass file content as one argument.How can i pass file content through URL.

eg:
content=`cat /Users/test1.txt`
open http://localhost:8080?filecontent=$content

[code],...

View 1 Replies View Related

General :: Stream Video Directly From Torrent File?

Jul 18, 2011

Is there some way to do live stream video directly from torrent? Are there linux tools like torrent cleint which can do this?

View 3 Replies View Related

General :: Shell Script File - Pass Multiple Parameters To Interpreter?

Feb 2, 2011

I have a Python script that I run which needs to execute under a special environment, so I would run the program like so from my working directory (~/project/src):

python manage.py shell

This opens up an interactive shell for me to start typing my own commands.I have another set of administrative activities that I would like to house in another directory (~/project/admin). The manage.py is really finicky about running from the working directory. So, to make this whole thing work, I made a script which starts off like so:

#!/usr/bin/python ../src/manage.py shell

There are a couple problems with this. The first is that it doesn't work:

/usr/bin/python: can't open file '"/../src/manage.py" shell': [Errno 2] No such file or directory

How do you specify multiple parameters to the interpreter?How do I change the working directory?

View 2 Replies View Related

General :: Executing Binaries - Pass The Hostname As A Variable Or Read From A File?

May 2, 2010

I am looking for a clue in shell or ant script, where I excecute a binay file on linux. For example ./myfile.bin which ask me few questions.

./myfile.bin ...........................100%

I would like to automate this process where I want to pass the hostname as a variable or read from a file is it possible? If yes any sample`s on this. I can do if this was a shell script ($1) but not sure when its binary.

View 8 Replies View Related

General :: Install Ubuntu On Vista From Iso File Directly From Hard Disk?

Jun 10, 2010

when i install ubuntu on vista from iso file directly from hard disk it install the copy completely but after booting up a white sreen comes up with vertical coloured linning.

View 3 Replies View Related

Ubuntu Networking :: Combine Rsync And SSH Pass - Backup File From Each Host With General Password In Local Network??

May 13, 2011

I made a script to backup file from each host with general password in local network. This script using SSH Pass and Rsync with this

syntax:
rsync --rsh="sshpass -p password ssh -l root" hostath destinationpath
Everything is okay under 9.10 version until I migrate to Ubuntu 11.04, there is always give an error:
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(541) [Receiver=3.0.7]

I am using bash version: GNU bash, version 4.2.8(1)-release (i686-pc-linux-gnu) and 2.6.38-8-generic kernel

View 3 Replies View Related

Debian :: Apt-get Unable To Fetch File

Mar 31, 2016

I'm trying to update libgphoto2 on a single-board computer running Debian but I'm having apt-get issues. When I run apt-get update I get this:

Code: Select allGet:1 ftp://ftp.us.debian.org sarge/main Packages
Err ftp://ftp.us.debian.org sarge/main Packages
  Unable to fetch file, server said 'Failed to open file.  ' [IP: 64.50.233.100 21]
Get:2 ftp://ftp.us.debian.org sarge/main Release
Ign ftp://ftp.us.debian.org sarge/main Release
Get:3 ftp://ftp.us.debian.org sarge/contrib Packages

[code]....

Why does apt-get not want to work?

View 3 Replies View Related

Programming :: Pass A Shell Variable To An AWK Command?

Dec 23, 2010

I have the following code :

Code:
E_BADARGS=65
if [ $# -ne 2 ] ; then

[code]...

View 1 Replies View Related

Ubuntu Installation :: Failed To Fetch File?

Aug 12, 2011

When I recently attempted to install Wine onto my computer from the Software Center, after the download bar had filled completely, I received the following error.

Failed to fetch http://us.archive.ubuntu.com/ubuntu/...u8.4_amd64.deb 404 Not Found [IP: 91.189.88.45 80]

Am running Ubuntu 10.10 w/ most current updates.

View 3 Replies View Related

CentOS 5 :: Go Fetch File On A Windows XP / 7 Machine?

Jul 28, 2010

Guys this might be something very basic but I have a file that I want to transfer from my Windows 7 machine to my CentOS machine

How do I do it?

I know in Windows I would do something like
Start--run--\IPsharename
but obviously that does not work in CentOS

How would I do it?

View 3 Replies View Related

Fedora :: 10 Loading Directly To Command Line?

Sep 18, 2009

I decided on a whim to pursue certifications in other operating systems (currently 70-620 and 70-290 certified with Microsoft) and bought a book on Fedora 10 and installed it on my extra PC. First issue I ran into was that due to my graphics card being an ATI I needed to run in text mode (based off posts on these forums) then once I finally got everything under control and installed, it loads directly into Command Prompt (you folks call it GRUB right?) I can log in as root but I can't do anything this way.It won't even allow me to do things like accept the end user license agreement or create new users or see the GUI.

View 2 Replies View Related

Software :: Finding A Tool That Can Directly Convert Mp3 File To A Swf File?

Jan 26, 2009

I'm looking for a tool that can directly convert mp3 file to a swf file. Tried ffmprg - 'ffmpeg -i master.mp3 -ar 22050 -ab 32 -f swf -y -vn new.swf', output is as follows:

Output #0, swf, to 'new.swf':
Stream #0.0: Audio: 0x0000, 22050 Hz, stereo, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0

I found a way to perform this task using ffmpeg to convert the mp3 file to a wav file, and converting the wav into a swf file using swftools (wav2swf), although this is not a good option because the output swf file size is very big - for a 12mb input 320kbps stereo mp3 file, the swf file is 25mb. Also downloaded a free direct mp3 to swf conversion software, which had an output swf file - with the same 12mb mp3 file - of ~400kb.

The requirements I have from the tool are:

1. Can be ran from the shell.

2. Direct conversion, or an indirect one that will produce a small output swf file.

3. Suport for multiple file conversion is a plus.

View 6 Replies View Related

Programming :: Pass An Expect Command Result Into A Variable And Then Use It Again?

May 4, 2010

I'm trying to create a program that would locate the oldest file of a certain type on a server. Here's the commands:

OLDEST_PATH=`find -L / -depth -maxdepth 6 -mindepth 6 -type d | sort -f | head -1`
OLDEST_FILE=`find -L $OLDEST_PATH | grep .mp3 | sort -f | head -1`
ls -al $OLDEST_FILE

I'm writing this all in expect but I'm having problems. The main problem I have is whenever I try to run the first command, I can't seem to isolate the result of the OLDEST_PATH so that the 2nd command will work. There always seems to be a newline in the variable and the result is only "find -L" command running and it bypasses the variable. If I can just figure out how to get the 1st and 2nd command to work, then I can figure out the 3rd. Here's some code:

Code:
send "find -L / -depth -maxdepth 6 -mindepth 6 -type d | sort -f | head -1
"
sleep 20
expect -re "(.*)

[Code]....

I know there is a better way to write this. I've tried multiple ways and this just happens to be the last way I've tried it. If you try running this, you'll notice that there is still carriage returns after the result of OLDEST_PATH and it prevents the 2nd "find" command from working properly.

View 2 Replies View Related

Programming :: Pass Carriage Return To Command Through Script

Feb 18, 2011

How can I pass carriage return to a command in the shell script. I am writing a shell script whcih generates ssh key pair. It ask for input from user three times. I want to pass carriage return (i.e., press Enter button) to this command.

View 2 Replies View Related

Programming :: Bash Script Which Uses Awk To To Fetch A Line From A File?

Mar 24, 2010

Below is the part of my bash script which uses awk to to fetch a line from a file. Choice is set by a case, and i know it is receiving a proper number because of the echo statement. The problem is with the syntax of the awk command it says the error is with one of the ', but when I run the command at the command line and replace "$choice" with a number it works properly. So I am not sure what is going on.

echo "announcing choice $choice"
command="awk 'NR = "$choice"' beerpong.txt | say"
$command

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved