General :: Unzip Command: Option To Force Overwrite?
Jan 26, 2010
I am writing a shell script that unzips a ZIP file into an existing hierarchy of files, potentially overwriting some of the files. The problem is that the unzip command asks for confirmation: replace jsp/extension/add-aspect.jsp? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
This is unacceptable for a script.I need an option to force unzip to overwrite the files.I did not find in the man page nor with Google.
View 1 Replies
ADVERTISEMENT
Jul 11, 2010
Problem is what unzip command, finish before all unzip is done.
Code:
#!/bin/dash
cd /home/ftpuser/www_base/
[code]....
View 3 Replies
View Related
Aug 5, 2015
While updating and upgrading, I got this at the command prompt:
Code: Select all ==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
View 3 Replies
View Related
Oct 21, 2009
I'm having some trouble with my networkmanager on openSuse 11.2. I want it to get the DNS Server from DHCP, but it notices that I had another process modify it (dhcpcd to be exact) and it just won't overwrite it, resulting in an out of date DNS server to be used.
View 2 Replies
View Related
Jan 18, 2010
there's a command to overwrite a directory.
View 6 Replies
View Related
Jan 21, 2010
I have a loadable module, simple enough I believe it should run on any 2.6 kernel. I want to force the load and test that assumption. How can I do it?
ismod does not seem to notice the -f in 2.7 modprobe has -f but cannot locate the module.No go. So I read the manpage for modprobe which says: modprobe looks in the module directory /lib/modules/'uname -r'.So I copied MYMODULE.ko to /lib/modules/2.6.(the only directory in here) and type: modprobe -f MYMODULE.ko.Still can't locate MYMODULE.ko.I notice there are no other .ko modules in that directory; so I go in deeper to kernel/drivers/char, guessing about the char directory, and copy MYMODULE.ko there.
View 1 Replies
View Related
Jan 5, 2010
For example I want a file to be processed by sed, and then overwrite the file with sed's output. I would try this:
Code:
sed '<regex goes here>' myfile > myfile
But it doesn't work as expected, instead it empties the file (I am thinking that as the first byte comes out of sed, it overwrites the whole file and sed has nothing more to do). How can I make this work?
View 14 Replies
View Related
Apr 12, 2011
I'm just wondering if there is an easy way I can generate a list of RPM packages which have been forcefully installed on the system (got a couple of servers transitioned).
All servers are RedHat-5 if that matters.
View 1 Replies
View Related
Feb 27, 2010
How to suppress "Do you want to overwrite" prompt while using cp command. I tried "cp -fr", but it isn't worked
View 4 Replies
View Related
Sep 14, 2010
How can I force all currently open sockets in linux to close from the command line?
View 2 Replies
View Related
Dec 21, 2010
I have a service which I want to run over eth1.
But all my other traffic still needs to run over eth0.
Is it possible to force a command-line tool or other application to use the non default interface?
View 2 Replies
View Related
Mar 6, 2011
I've modified by mistake my menu.lst file. Both menu.lst and grub.conf are empty. how to fix this? Is there any command to quickly rewrite those files?
View 2 Replies
View Related
Aug 27, 2009
difference between using "jar xvf" and "unzip" to unzip the zip-file?
View 4 Replies
View Related
Jan 17, 2011
Code:
if [ -x /usr/bin/id ]; then
if [ -z "$EUID" ]; then
[code]....
View 4 Replies
View Related
Nov 17, 2010
$ ls one.tar.gz
one.tar.gz
$ tar -xvfz one.tar.gz
tar: z: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
$ tar -xvzf one.tar.gz
one
$ tar -xzvf one.tar.gz
one
$ tar -zxvf one.tar.gz
one
$
View 2 Replies
View Related
Mar 10, 2011
i've an issue in a firewall command i hope u help me on.when i try to type the following firewall command:iptables -A INPUT -s xxx.xxx.xxx.xxx -dport 8000:9000 -p tcp -j ACCEPTit gives me:Bad argument `8000:9000`it complaints about the port range and i cant see in problems in that.i also tried to change the order of the options but it never worked.one other thing,why it don't allow me to add -sport option in the above command?
View 1 Replies
View Related
Feb 8, 2011
I'm trying to use the dirs command with the +N option. The manual says: dirs [-clpv] [+n] [-n]Without options, displays the list of currently remembered directories. The default display is on a single line with directory names separated by spaces. Direc- tories are added to the list with the pushd command; the popd command removes entries from the list. +n Displays the nth entry counting from the left of the list shown by dirs when invoked without options, starting with zero.
dirs -v shows:
0 /dir1/
1 /dir2/
2 /dir3/
However, dir +n 1, dir +N 1, dir -v +n 1, dir -v +N 1 all give:
[Code]...
View 2 Replies
View Related
Aug 1, 2010
In the rpm manual, Print 50 hash marks as the package archive is unpacked. Use with -v|--verbose for a nicer display. But actually, there're not enough hash marks when I'm installing a package. About 44 hash marks there...Well, I just want to know where the `50 hash marks' are.
View 4 Replies
View Related
Apr 23, 2010
I tried to install gfortran on my computer. When I extract the tarball, I forgot the '-C' option of the command 'tar', which should be added, according to the instruction of installation.
That is to say, I wrote in the mp directory:
Then, the tarball creates a '/usr' directory under '/tmp' directory, and it contains only a /local directory, which contains only a /gfortran directory.
The thing is, when I modify the name of this directory, for example, from /usr to /usr-modi, I found that the name of the directory /usr under the root directory is also changed from /usr to /usr-modi.
How can I delete this annoying /usr directory under /tmp, without tragically affect /usr under the root directory?
View 4 Replies
View Related
Jan 10, 2011
I am trying to automate an svnadmin dump command for a backup script, and I want to do something like this:
find /var/svn/* ( ! -name dir -prune ) -type d -exec svnadmin dump {} > {}.svn ;
This seems to work, in that it looks through each svn repository in /var/svn, and runs svnadmin dump on it.
However, the second {} in the exec command doesn't get substituted for the name of the directory being processed. It basically just results a single file named {}.svn.
I suspect that this is because the shell interprets > to end the find command, and it tries redirecting stdout from that command to the file named {}.svn.
View 2 Replies
View Related
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
Apr 2, 2010
I wanted to assign ownership of my choice to my zip file while unzipping so I am using the command:
unzip yourfile.zip|awk -F": " '{print $2}' | xargs chown user.group
I also want to give 705 permissions to all directories and 777 to all files on unzipping?
View 3 Replies
View Related
Jun 24, 2010
i wanna transfer files from my windows pc to linux server.
suppose i have a file structure like this:
img /
logo.gif
css /
style.css
index.php
i tar.gz the directory, then upload, and then tar-xvzf the uploaded file. but the result is 3 file in root like this:
imglogo.gif
cssstyle.css
index.php
when i use zip instead of tar.gz it breaks the structure. i.e. it unzip some directories as empty files. fr examples it makes an empty file named img.
what's the reliable solution to transfer files between windows and linux?
View 1 Replies
View Related
May 6, 2010
trying to unzip only 1 directory in my .zip file, the reason is that i don't have enough space to unzip all the contents of .zip file. and i am trying to do it with unzip command.
View 4 Replies
View Related
Feb 25, 2010
I have a problem where I have certain foo.tgz files that are to big to gunzip in a directory, the box that it is on has limited space in /var/tmp for all intents and purposes. I did the standard gunzip -l to see how big the file was.
How can I look in the .tgz to see what files are there and pull out only the ones that I need. tar -t foo.tgz doesn't seem to work or am I doing something wrong?
Once I do find the file how do I only extract the one file from the .tgz, remember I can't uncompress the entire foo.tgz
View 14 Replies
View Related
May 5, 2010
How to unzip the zip files to local directory in linux?
View 5 Replies
View Related
May 6, 2011
So I have a script that simply unzips a file with a line:
unzip /path/to/file.zip
which unzips and puts the unzipped directory in the same directory as my script. The issue is, I want the unzipped directory to be in the same directory as the original zipped file.
I googled and found the -d flag which would let me specify what directory to put it in but the script asks the user to define the directory so I don't see how I could use that (because the user specifies the path all the way to the zipped file, not just the directory where the zipped file is)
View 2 Replies
View Related
Jun 15, 2009
I ran "yum update" on 03-06-2009 and it updated my samba version from
3.2.8-0.26.fc10.x86_64
to
3.2.11-0.30.fc10.x86_64
My network shares then became read only!After some digging it turns out my system is not working because of Samba bug 6291, the "force user" option is no longer working.
Ideally I would run another "yum update" and that would fix the problem. Apparently the bug has been fixed in Samba 3.4.0pre2 - when can when we expect that to be released and included when I do a "yum update"?
Alternatively how do I get back to version 3.2.8-0.26.fc10.x86_64 ?
View 2 Replies
View Related
Aug 14, 2011
I have noticed that a CD or DVD wont mount in Ubuntu 10.04 but always mounts on a reboot. /media is empty.Could this maybe a hardware issue rather that a fault with Ubuntu? My PC is used almost every day and is 4 years old. Is there a command to force mount a CD or DVD?
View 6 Replies
View Related
Jun 22, 2009
I'm trying to find all zip files timestamped from the past 7 days, then unzip them into a different director.I tried the following, but it only unzipped one of three files that meet the 7 day criteria. What am I missing?Code:find /home/user/public_html/zip_files/ -iname "*.zip" -mtime -7 -print0 | xargs -n10 unzip -LL -o -d /home/user/public_html/another_directory/
View 1 Replies
View Related