General :: Unzip To Same Directory As Zipped File?

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


ADVERTISEMENT

General :: Copy Zipped (my.zip) Files From Windows To Systems And Unzip Them Without Any Corruption

Jun 11, 2010

Is it possible to copy zipped (my.zip) files from Windows systems to Linux systems and unzip them without any corruption.

I know the command unzip is available, but I want to know if this copying from WIndows to Linux could lead to file corruption.

View 7 Replies View Related

General :: Unzip Only 1 Directory In .zip File?

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

General :: Extract The First Few Contents Of A Zipped File And Then The Next Fixed?

Oct 30, 2010

I want to know if there is anyway I can extract the first few contents of a zipped file and then the next fixed and so on? For example, suppose I have a zipped file containing 1000000 natural numbers and I want to extract the first thousand numbers and then the next thousand numbers (1001-2000) and so on till I reach the end. Is this possible?

View 3 Replies View Related

General :: Ubuntu - File Was Deleted And Then Reappeared When Folder Was Zipped

May 11, 2010

I am using Backtrack 4 Final, which is a Linux distro that is Ubuntu based. I had a directory that contained around 5 files. I deleted one of the files, which sent it to the trash. I then zipped the directory up (now containing 4 files), using this command:

zip -r directory.zip directory/

When I then unzipped directory.zip, the file I deleted was in there again. I couldn't believe this, so I zipped up the directory again, and the file reappeared again but this time could not be opened because the operating system said it didn't exist or something. I don't remember the exact error, and I cannot make this happen again. why a file that was deleted from a directory would reappear in that directory after it was zipped up?

View 1 Replies View Related

General :: Unzip Zip Files To Local Directory?

May 5, 2010

How to unzip the zip files to local directory in linux?

View 5 Replies View Related

General :: Xargs And Unzip All Files To Specific Directory?

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

General :: Difference Between Using "jar Xvf" And "unzip" To Unzip The Zip-file?

Aug 27, 2009

difference between using "jar xvf" and "unzip" to unzip the zip-file?

View 4 Replies View Related

General :: Not Allowed To Unzip A File In DIR?

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

Ubuntu :: Unzip Command, Finish Before All Unzip Is Done?

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

Fedora :: How To Unzip Z7 File

Sep 15, 2010

I have this file with a z7 extension. The question is simple, how do we unzip this ?

View 2 Replies View Related

Programming :: Unzip The *.bz2 File Using Php Coding?

Nov 29, 2010

Below is my code to create *.bz2 file.

<?php
//Moving file to temporary directory for compression
move_uploaded_file($_FILES["file"]["tmp_name"],"c:/" . $_FILES["file"]["name"]);
$url="c:/".$_FILES["file"]["name"];
//File compression

[Code]....

Anyone know, how to unzip the file ? I've tried the above code to unzip it but it creates only 1kb of file for any files.

View 3 Replies View Related

CentOS 5 :: How To Unzip Binary File

Sep 8, 2011

edit unzip binary file to fix a security issue with cpanel?i tried hex editior but i canot understand the file codes!iam a basic php scripter and pwn but i canot understand this its just numbers and strange characters!......................45..................5......@#........ like this

View 1 Replies View Related

Software :: Unzip The Epub File And View The Content In Lynx?

Feb 8, 2011

I have an epub book that is mostly text. I realize that with some effort I can unzip the epub file and view the content in lynx. Is there a better way to read a text-centric epub at the console?

View 2 Replies View Related

General :: Setting Permissions On Unzip?

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

General :: How To Unzip A Windows-built .tar.gz

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

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 View Related

Red Hat / Fedora :: Backup Program - Cannot Be Zipped Or Compressed

Apr 16, 2010

What i am trying to acheive with my minimal knowledge is to set up a linux system that will backup windows based computers to a couple of terabyte hard drives installed in this system. The backups cannot be zipped or compressed in anyway as the backups have to be able to be di-sected and only parts of them restored to their respective computers. Backing up over a network would be a great bonus but not necessary. Does anyone know a program that would fulfil my needs whilst still being simple so i can install and configure it?

View 2 Replies View Related

General :: How To Unzip Files On Acer One Running System Lite

Jun 26, 2010

I have downloaded an update of mozilla firefox but don't know how to unzip it. Do I download it to disc(hard drive) or do I download to xarchiver? Then how do I unzip it.Do I have to unzip all files the same way?

View 7 Replies View Related

General :: Unable To Access File /home/username/.iceauthority: No Such File Or Directory

Apr 21, 2011

Can't log into my XFCE desktop like I normaly do. all the sudden I get notified that my xsession lasted less then 10 secondsLooking at the error I can see this:

Unable to access file /home/username/.iceauthority: No such file or directory

Using failsafe I can start a terminal. From terminal I tried to start X

Code: sudo startx Result: Running on desplay:0

So I tried to run this;

Code: sudo startxfce4 And I get up a graphical desktop.

So this is not a critical situation as I easily can use this method to log on, but as there has been something causing this I would like to be able to resolve this nonetheless. Btw it is not the old chmod trick in play here, cause my .iceauthority file is gone alltogheter.

View 6 Replies View Related

General :: 6.13 GMP-5.0.0 LFS Make Error - Cannot Open Shared Object File: No Such File Or Directory

Jun 10, 2010

I'm currently stuck at 6.13 GMP-5.0.0 of the LFS installation. After running make, I receive the following:

error while loading shared libraries: libbfd-2.20.so: cannot open shared object file: No such file or directory
make[2]: *** [libmpn.la] Error 127
make[2]: Leaving directory `/sources/gmp-5.0.0/mpn'

[code]....

View 5 Replies View Related

General :: Libgtk-x11-2.0.so.0: Cannot Open Shared Object File: No Such File Or Directory

Mar 28, 2010

I'm trying to install PCSX2 (PS2 emulator) and I get the following error: ./pcsx2: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

I've followed the instructions here http://pcsx2.net/downloads.php and believe I have all the dependencies installed. My system has the following file:

/usr/lib/libgtk-x11-2.0.so.0

View 6 Replies View Related

General :: Changing Directory - Saved File On The Desktop - Cannot Seem To Get That File To Execute It

Mar 10, 2011

I was doing a tutorial on scripting in bash. I saved my file on the desktop and I cannot seem to get to that file to execute it. Here is what I have been using:

I try cd Desktop says that there is no such directory.

I tried /home/me/Desktop same thing.

View 5 Replies View Related

Software :: Get First File Of Directory Then Copy To Other Directory Andd Rename The File?

Jan 30, 2011

I want to do the following.

1. have a directory full of subdirectory

2. Pick the first file from every sub and copy that to the main directory and also rename that file to the same name as the subdirectory's name

3. need to work in commandline best is a simple script.

View 4 Replies View Related

General :: Extracting Tar File: Cannot Open: No Such File Or Directory?

Jul 19, 2010

I have a remote Debian 5 machine on which I'm trying to extract a tar-file (Django 1.2.1, but that's unimportant). The first 1300 or so files extracts just fine (of about 2800 in total), after which errors liketar: Django-1.2.1/tests/urls.py: Cannot open: No such file or directoryshows up for the rest of the files, finally ending up with atar: Error exit delayed from previous errorsI use the commandtar xzvf Django-1.2.1.tar.gzI've also tried with sudo (but I'm extracting in my home directory, which I should obviusly have permissions to use without). I've tried gunzipping first (runs flawlessly) and then running tar xvf, but to no avail. I've fetched the file using wget:

View 1 Replies View Related

General :: '/etc/x11': No Such File Or Directory

Mar 13, 2011

the contents of the folder could not be displayed Error stating file '/etc/x11': No such file or directory

View 2 Replies View Related

General :: Usb.h: No Such File Or Directory

Jul 6, 2010

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <usb.h>
int main(int argc, char **argv){
struct usb_bus *bus;
struct usb_device *dev;
usb_init();
[Code]....

I am compiling this code gcc libusb.c -o libusb -lusb but it saying error as usb.h: No such file or directory

View 3 Replies View Related

General :: Get Socket.h Header File / Copy Pasting This Header File In 'incl' Directory Allow To Use It In The Program?

Apr 22, 2011

where can i get socket.h header file? will copy pasting this header file in 'incl' directory allow me to use it in the my program?

View 1 Replies View Related

General :: Extract A Zip File To Own Directory?

Apr 21, 2011

Im trying to extract the contents of a zip file but I want to extract it to my own directory. I'v tried -d from unzip but that just puts the contents of the zip into that directory.

But I want to extract the contents of the first (root) directory in the zip if there is only one directory in the root of the zip else just extract the files/folders in the root of the zip file (if there are more then one files).

e.g. test.zip contents the following dir structure:

test.zip
/app_v1/ <-The contents of this directory I want extracted to a dir of my choice
- folder-1
- folder-2
- folder-3
- folder-4
- file1
- file2

View 2 Replies View Related

General :: Executing File Of Some Other Directory From PWD

Jan 14, 2010

My present working is
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/demo/c++ #
Now I want to run "python scons/scons.py" located in
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/ #

I tried
Code:
../../python scons/scons.py
From the above stated PWD but it resulted in the following:
Code:
bash: ../../python: No such file or directory
What is the way to execute a file of some other directory from the PWD!

View 14 Replies View Related







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