General :: How To Archive - Tar - Every Subdir
Jul 26, 2010
I am stuck trying to write a script that does the following :
1. loops through all subdirectories of a given directory
2. for each found subdirectory, first create an archive carrying the same name as the subdir itself
3. then moves the actual subdirectory to a different path
Here is what I have so far: my base dir is /home/bob/Bureau, and it contains two sub dirs, "florissant 86 a" and "saule 84" I would like to create one archive for each subdir in /media/public/atelierPhotoArchive and then move the folder entirely to /tmp/photo.write
Everything goes well until I have to either tar or loop through the file with spaces in names
This last statement outputs different lines after each space in my lst file
Question 1: Is it possible to make it output once for each line in the file ?
Question 2: Is it possible to do some exec tar in the find command? I had difficulties extracting the "short" name for the archive ("saule 84") without /home/bob/Bureau, it is possible only with the printf %f, but how in the world can I get this value in to the exec option ?
View 7 Replies
ADVERTISEMENT
Jul 13, 2011
I am new to the world of linux and when attempting to verify a tar archive I am displayed the following error. When running the command tar cvfW archivename.tar filename directoryname does not yield any errors.
View 1 Replies
View Related
Jun 24, 2011
To investigate an issue, I need to tarball all the files in a sub-directory without prepending the name of the subdir to each file. For instance, I do notwant tar to include MYSUBDIR:
Code:
/tmp# tar czvf package.tar.gz MYSUBDIR
MYSUBDIR/
MYSUBDIR/file1
MYSUBDIR/file2
I tried "-C MYSUBDIR", or "tar cvPf", but tar always includes the path to the files.
The only way I found is to "cd MYSUBDIR" before running "tar cvf".
Is there a way to tell tar to exlude the subdir name?
View 7 Replies
View Related
Dec 6, 2010
I'd like to ask about archive mounter feature, can I mount zip file with read write mode? can gvfsd-archive do that?, or I must use fuse-zip to mount it? If I must use fuse-zip, how I wrap it so I can use it via nautilus or via gvfs-fuse-daemon
View 4 Replies
View Related
May 30, 2011
Need to recurse a subdir tree, to apply chmod and chown and ls -al .
chmod -R xxx yyy does not function properly; -R is nonfunctional.
chown -R xxx yyy functions OK.
Is there a script which will follow a subdir tree and open each subdir ? glene77is
View 9 Replies
View Related
Jul 3, 2011
I am using Safesync from Trendmicro to backup my data. Since some time I am experiencing heavy problems. Normally my Backup should look like this: But when I am mounting it with WebDAV, it is looking different:
Code:
cdrewing@christian-desktop:~$ sudo mount -t davfs http://dav.trendmicro.safesync.com /media/Safesync
[sudo] password for cdrewing:
Gib bitte den Benutzernamen f�r den Server http://dav.trendmicro.safesync.com an; wenn du keinen angeben willst, dr�cke Return.
[Code]...
Note: When I am mounting Safesync with Nautilus, everything is functional and ok. But I need my command line access because I want to use rsync. A workaround could be to access the resource via the nautilus mount. Where can I find this via the command line?
View 1 Replies
View Related
Jan 10, 2010
I'm new to Ubuntu, and everytime i've tried to download a program like iTunes, the "Archive Manager" comes up and says "An Error Has Occured While Loading the Archive". how to fix this or download programs ?
View 7 Replies
View Related
Feb 14, 2010
I had created a tar ball of my home folder. But after formatting the system when I tried to untar it, it is showing the following error:
Code:
How to somehow recover my home folder!
View 3 Replies
View Related
Mar 25, 2010
Is it possible to archive a directory using tar and keeping the acl implemented on it intact?
View 5 Replies
View Related
Feb 6, 2009
I have a directory that contains some files. Let's call it ./ActiveContent.
I have a tar ball that contains some updated files, let's call it updates.tar.gz.
How do I unpack updates.tar.gz in the directory ./ActiveContent so that files in updates.tar.gz overwrite the identical named files in the directory?
That is to say, an option that directs the utility to over write existing files wile expanding a tar archive into a directory?
View 3 Replies
View Related
Jul 19, 2010
I want to untar a package from one directory to another directory, directly from the command prompt. I want to untar the joomla package into the htdocs directory of xampp. How to do that directly from command prompt ? The reason i am asking this is if I try the "drag and drop" way, it won't be possible as xampp is stored in /opt directory and without super-user authentication nothing can be saved into it. You can argue saying that why did I untar xampp initially in su mode ,but that had to be done so that apache doesnt give me any start-up problems.
View 2 Replies
View Related
Mar 25, 2011
How can we extract a .rar archive in Linux?
View 2 Replies
View Related
Feb 4, 2010
Is it possible to compress the mysqldump output into say db_backup.sql.tgz. Then add that to an existing archive e.g. backup.tgz in one command or on the fly to save space and deleting it?
View 3 Replies
View Related
Apr 21, 2010
I'm trying to use tar to tar files before transfer, so I can keep the entire file path rather than losing it along the way. However, when I try to tar an empty folder, it tells me that it is cowardly refusing to create an empty archive. I want to keep the empty folder on the other end, but don't want to put anything else into the archive to make it non-empty. Is there any way to do this?
View 1 Replies
View Related
Apr 27, 2010
I need files to be <= 5GB to put on S3. Right now I have an ugly tar / gzip / cut before upload, then cat / zcat / tar on download, but it's really ugly - and nearly every archiver should support archive splitting right? What's the best way?
View 2 Replies
View Related
Feb 11, 2011
I'm searching for a tutorial on how to convert my videos (AVI, WMV and MKV formats) to a format that offers both good quality and small size.The audio part should be 128 kbit/s mp3 lame.I'm using Fedora 14 with an rpmfusion repo. It would be especially nice to be able to batch-convert the AVIs.
View 1 Replies
View Related
Mar 8, 2009
When trying to delete :
I must say that the tar file contain only soft links...not real files...
View 5 Replies
View Related
Mar 31, 2011
I have been playing around with the tar command and I know this is how to use it.
Code:
tar -cf [filename] [directory]
But what I want to make an archive from the current directory I thought just to not enter a directory but that doesn't work. I get an error about creating a empty archive so how to do I make it so how do I tell it to do the current directory?
View 5 Replies
View Related
Jun 5, 2011
The command tar -xvf wpa_tables.tar gives this error
tar: ./xai-0/334Regency: Cannot open: Invalid or incomplete multibyte or wide character
tar: Exiting with failure status due to previous errors
Obviously the backslash is giving tar some problem, but I've been all over the docs and can't figure out how to either make it skip this file or interpret the character literally. Here's my command history to show some of the options I've tried which don't work.
tar --no-wildcards -xkvf wpa_tables.tar
tar --exclude ./xai-0/\334Regency -xkvf wpa_tables.tar
tar --exclude "./xai-0/\334Regency" -xkvf wpa_tables.tar
tar --ignore-command-error -xkvf wpa_tables.tar
tar --ignore-failed-read -xkvf wpa_tables.tar
tar --transform 's/\/slash/g' -xvf wpa_tables.tar ./xai-0/\334Regency
I'm totally out of ideas at this point and would welcome some input from more experienced members.
View 1 Replies
View Related
Jun 7, 2011
I need to know that how to convert a java class file into java archive (jar)
View 1 Replies
View Related
Sep 3, 2010
Ubuntu 10.04. As part of my nightly backup script I archive my home directory with the following command
tar -cvpzf /quitelarge/_mirror/mirror1/home-ken.gz /home/ken 2>> /quitelarge/_mirror/tar-error.log
It seems to work fine and I have recovered files from the archive on occasion. Actually I keep 7 rolling daily backups and a monthly burn to DVD. I had an sftp connection made by Nautilus to my server. Ubuntu for whatever reason places an icon on the desktop showing the connection. When I ran the script it decided to archive everything on my server - all 1.4 TB. I caught the problem when home-ken.gz was about 5 GB. I stopped the process, closed the sftp connection, rolled back the backups and tried again. This time I got a file of the expected size - about 45 MB.
In the error log I did find that the tar process was trying to suck the entire contents of the server into the archive file.
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5/pcm0c/sub0: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5/pcm0c: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/scsi: file changed as we read it
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/event: Cannot open: Permission denied
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/fadt: Cannot open: Permission denied
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/dsdt: Cannot open: Permission denied
tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/irq/21/smp_affinity: Cannot open: Permission denied
Is there an option I can place on the tar command to tell it NOT to follow the ssh connection which is sitting on my desktop? The closest thing I see in the documentation is -h which tells tar to "follow symlinks; archive and dump the files they point to." I am NOT specifying -h so if the ssh connection is treated as a symlink by tar I would still not expect the remote contents to be tarred.
View 13 Replies
View Related
Mar 15, 2011
I am using OpenSuse 11.2
Today i downloaded a zip file and tried to extract it using the right click "Extract archive Here" and nothing happened.
View 3 Replies
View Related
Apr 12, 2010
I have a directory there are many files are writing to it , I would like to write a script to do that , can please provide the advise .
archive all files to one single file in every 30 days , and then remove these old files .
View 9 Replies
View Related
Jul 22, 2010
I'm trying to create backup/archive my Ubuntu 10.04 system files (so I can restore it in case my system get corrupted). More specifically, I'm trying to zip the important files in my root directory not including my home directory (which includes my documents which I backup separately/more frequently) to an external hard drive attached via USB (called 'My Book').
Since File Roller didn't give me quite the level of control I was looking for, I created a script that I could execute to backup and archive regularly. Here's a snippet:
cd /media/"My Book"/"Linux Backups"
NOW=$(date +"%b-%d-%y")
LOGFILE=Backup_Root_FileSystem-$NOW.log
sudo zip -r -T -v Backup_Root_FileSystem-$NOW / -x /media/'My Book'* /media* /proc* /sys* /mnt* /dev* /cdrom* /home* /'lost+found'* | tee -a $LOGFILE
[Code]...
View 5 Replies
View Related
May 19, 2010
is there a way to view the Unix permissions for a file under Windows?
View 1 Replies
View Related
Dec 13, 2009
I'm using Debian 503 Lenny, Gnome. My machine, She-Beast, is a 2001 Compaq Presorry-o, 1100GHz Celery. With every, that is, E V E R Y, attempt to install any .deb, it fails. When I 2x click on the .deb icon, or when I r-click -->Open with archive manager, I get a dialog window:
"Could not open "(filename).deb". Archive type not supported."
If I use root terminal, dpkg -i, similar responses come up.
View 14 Replies
View Related
Aug 20, 2011
When I open the minecraft.jar file with p7zip on Linux, I can't delete the META-INF folder.
This is the error:
Error: /home/davide/.minecraft/bin/minecraft.jar is not supported archive
System error: Operation not permitted
View 1 Replies
View Related
Mar 28, 2011
when iam opening my dec_backup folder the folling error is appering :
the error is gzip :stdin:input /output error
/bin /gstar :unexpected EOF in archive
/bin /gstar: error is not recoverable :exesting now
View 1 Replies
View Related
Mar 27, 2011
When I use the -p switch for the package p7zip-full (program 7z), it only password protects the extraction process but it still shows the list of files when you try to view the contents of the archive whereas the graphical compression utility has a feature to not show the list as well. I read the man page and can't find the feature for the CLI equivalent. how to do this using the CLI?
View 1 Replies
View Related
Sep 15, 2011
networkmanager kde installed I have to add the configuration of a VPN using a archive .ovpnBut in knetworkmanager vpn tab, not see the option to import. Only displays "add, edit and delete".How I can add this option?
View 1 Replies
View Related