Software :: Gnu Tar Creates Multiple Odd Directories With Numeric Names When Extracting?

Feb 4, 2010

I become to use tar with incremental feature for archiving data under ubuntu.But when I try to extract archive later under windows (using gnu tar also) it creates many directories like this:

<...>
11324447220
11324447221

[code]...

View 2 Replies


ADVERTISEMENT

General :: Extract To Multiple Directories Based On File Names?

Jan 30, 2009

I'm not sure if this is possible or even where to start. I assume that this can be done with an sh script using tar or similar.I have several very large zip files that contain images for all of the products in my online store. Each image is named after its 13 digit SKU (for example, 9987788000012.jpg). In order to import products into my store, all images are placed into a media directory. Unfortunately, there are over 100,000 images.

So I would like to break the images into sub-folders based on file name. For example, when I extract store_images.zip (or tar or whatever), my extract script would create directories (if they don't already exist) based on the first three digits of each image name, placing each image into the appropriate bottom level directory. For example, "9987788000012.jpg" would be placed in the following directory "media/9/9/8", with media as the root and "8" as the directory that holds any images that start with "998". Perhaps two sub-folders would be less cumbersome.Assuming this requires a script, particularly since it involves scanning image names, creating folders, and saving images to specific directories, which language would serve my needs best? PHP? Has anyone had to do something similar?

View 13 Replies View Related

General :: Replace ":" From Multiple Files Names - Even Recursively In Directories

Jan 31, 2010

I need to replace ":" from multiple files names, since I am going to copy those files from a linux partition, which admit the ":" to a FAT32 partition, which does not.

Example:
original name: eg06_ana_21-05-06_09:21:03.JPG
wished name: eg06_ana_21-05-06_09-21-03.JPG

I have googled a lot but I have not been able to adapt the examples given by people to my aim.

It seems that rename command is what I should use, but I have no idea to build the correct pearl expression.

View 3 Replies View Related

Software :: A Tool For Extracting File Names From *.torrent Files?

May 24, 2011

I need to know file names in torrent without opening torrent client. Know and extract for further actions.

View 2 Replies View Related

Software :: User1 Can Modify / Delete All Files / Directories That Ftpuser Creates?

Feb 1, 2011

I have two users in home on Debian stable: user1 and ftpuser.Proftpd is configured so that it uses ftpuser for clients.How to set it up so that user1 can modify, delete, etc.. all files and directories that ftpuser creates?

View 3 Replies View Related

General :: Multiple Users To Create Directories Over SFTP So The New Directories Keep The Same Permissions?

May 15, 2011

I want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.

I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.

I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?

View 2 Replies View Related

Red Hat / Fedora :: Bash - Echo Multiple Numeric Values On One Line

Aug 9, 2009

I'm trying to get multiple numeric valued version information into a variable, all on the same line. I want for example $VERSION=3.1.0.01.002. I'm trying to pull seperate values from the file named version.properties, wherein the file contains;

patch.rel.num=0
sqa.num=01
major.rel.num=3
build.num=002
minor.rel.num=1

So I have the following script:
#!/bin/bash
BUILDVERFILE="version.properties"

PATCH=`grep "patch.rel.num" ${BUILDVERFILE} | awk {'print $1'}`
SQA=`grep "sqa.num" ${BUILDVERFILE} | awk {'print $1'}`
MAJOR=`grep "major.rel.num" ${BUILDVERFILE} | awk {'print $1'}`
BUILD=`grep "build.num" ${BUILDVERFILE} | awk {'print $1'}`
MINOR=`grep "minor.rel.num" ${BUILDVERFILE} | awk {'print $1'}`

P=`echo $PATCH | tr -d .=[:alpha:]`
S=`echo $SQA | tr -d .=[:alpha:]`
MA=`echo $MAJOR | tr -d .=[:alpha:]`
B=`echo $BUILD | tr -d .=[:alpha:]`
MI=`echo $MINOR | tr -d .=[:alpha:]`

VERSION=$MA.$MI.$P.$S.$B
echo $VERSION #

I end up with the value of .002 ?? Seems like it's only getting the last portion because if I run the script thru "bash -x" I get:
...
+ VERSION=$'3
.1
.0
.01
.002
'
+ echo $'3
.1
.0
.01
.002
'
.002

View 7 Replies View Related

Networking :: Creates Multiple Threads Of The Downloading Process?

Apr 30, 2010

I have created a simple download schedular with source-code give below :

---------------------record_strokes.sh-------------------
touch /home/student/packs/lynx/logfile
lynx -cmd_log /home/student/packs/lynx/logfile

[code]....

So, this is a simple download scheduler program code. Which creates multiple threads of the downloading process - wget (i could also have used 'curl' instead 'wget').Can you debug this code?

View 1 Replies View Related

OpenSUSE Network :: Samba Creates Multiple Copies Of Video In /tmp

Dec 30, 2009

I have a desktop and a laptop both running opensuse 11.2 with kde4. I have a samba share on my desktop. I tried opening a video on that share from my laptop (wirelessly) with Dolphin/SMPlayer. Here's what happened:

The video started downloading and the system tray notified me it would take 25 minutes. I thought that was too long (video is 350MB) so I checked the download speed and it was about 2 MB/s. It didn't make sense but I let it keep going.

25 minutes and 3.4 GB later, the download finally "finished"--according to the system tray. However, I checked my system monitor and something was still downloading at 2 MB/s. I confirmed with "df -h" that I was losing 2MB of space a second. At this point I only had about 700MB of disk space left so I rebooted (I wasn't sure how else to stop the download).

After digging around on / I found my video at /var/tmp/kdecache-londy/krun and it was 350MB. Then I found multiple copies of the same video, of varying sizes, on /tmp/kde-londy totalling 3GB.

I deleted the tmp files and tried it again. This time instead of clicking on the video to play it, I tried copying it to my laptop. Same thing started to happen but I didn't let it continue.

View 9 Replies View Related

General :: Rename Multiple Files In Multiple Directories/subdirectories Recursively?

Aug 23, 2010

I am to rename all the files within a directory (which contains multiple subdirectories) recursively without invalid characters.

I tried the coding posted above.

find . -type f -printf '%p
' | while read file; do
oldfile=$(basename "$file")
newfile=$(echo "$oldfile" | sed 's/[^A-Za-z0-9_.]/_/g')
if [ ! "$newfile" == "$oldfile" ]; then
echo mv "$file" "${file%$oldfile}$newfile"
code....

but I get an error on both of them stating "find: bad option -printf find: [-H | -L] path-list predicate-list"

View 9 Replies View Related

General :: Extracting Columns From Multiple Files With Awk?

Sep 22, 2010

I'd like to extract a single column from 5 different files and put them gether in an output file. I saw a similar question for 2 input files, and the line of code workd very well, the code is:awk 'NR==FNR{a[NR]=$2; next} {print a[FNR], $2}' file1 file2I added the file3, file4 and file5 at the end, but it doesn't work. Does anyone know what do I have to do?

View 5 Replies View Related

Programming :: Search For Directories With The Highest Characters In Their Names?

Aug 29, 2010

How do you tell a shell script to search for the directory within another directory (in this case /lib/modules) whose characters in its name (in this case numbers) are highest? I want to be able to tell mkinitramfs in a script to be able to see the highest possible kernel version in the /lib/modules directory.

View 2 Replies View Related

Red Hat :: Bunch Of Directories Names Beginning With .gnome In /root

Mar 14, 2011

Bunch of directories beginning with .gnome in /root..

View 1 Replies View Related

General :: Extracting Information From Multiple Text Documents?

Jul 7, 2010

I am an astronomy student using Ubunut 10.04, and a frequent user of IRAF ( an *nix image processing application geared toward astronomy). IRAF produces, amongst other things, a text document with various values on it (example below).

Code: K IRAF = NOAO/IRAFV2.14.1 version %-23s
#K USER = name %-23s
#K HOST = Balthazar computer %-23s
#K DATE = 2010-04-29 yyyy-mm-dd %-23s

[Code]...

Now, the information I'm actually interested is the X and Y coordinates down towards the bottom (in this case, 973.505, 271.474).

I have about 800 of these output text files, and I was wondering if there's any sort of script or command that could go through them (presumably reading from a list of file names), and extract the coordinates. Ideally, the output would be a list of coordinates (i.e. X-coordinate, Y-coordinate).

View 1 Replies View Related

General :: Download Scheduler Program Code Which Creates Multiple Threads Of The Downloading Process?

Apr 30, 2010

I have created a simple download schedular with source-code give below :

---------------------record_strokes.sh-------------------
touch /home/student/packs/lynx/logfile
lynx -cmd_log /home/student/packs/lynx/logfile

[code]....

View 1 Replies View Related

Ubuntu :: Create Two Lists Of File Names Irrespective Of Directories And Compare?

Aug 13, 2010

I have an internal hard drive and an external hard drive, both with about 350 GB of data. The data came from the same source, but over the last couple of years, different people have moved files around to different directories, and some files have been deleted. Now I want to merge all the files onto the internal hard drive. I estimate that 80% of the files on the external hard drive are the same, so I don't want to copy 290+ GB of data over when I already have it.

Therefore, I need a way to find just the files on the external hard drive that don't already exist on the internal one. In other words, I need to create two lists of file names irrespective of directories and compare them, selecting only the file names that exist in one list OR the other. I've Googled for solutions but can't find anything suitable. There are ways to create text files of the file names and compare them with diff, but they have to be in the same order, and since these files are in vastly different directories, that won't work.

View 5 Replies View Related

Ubuntu :: Automate Creating Directories Based On File Names And Moving Files Into Them

Apr 30, 2011

I have a bunch of .7z files in a directory, and I need to put each one of them into a separate directory, named after the file (without extention). The command line I use:

Code:
find . -type f | mkdir `sed -e "s:..(.*)...:1:"` ; ls | grep .7z | cp * `sed -e "s:(.*)...:./1/:"`
Copying fails though:

[Code]....

PS. I don't want to use scripts, I want to do it using simple commands and piping.

View 5 Replies View Related

Networking :: Multiple Domain Names On One IP Address?

Dec 19, 2009

Is it possible to have one static IP address with a NAT network forwarding each domain name to certain internal/DMZ IP addresses? I know you can do it by port but if both websites are on port 80 can you forward to the corresponding server on the dmz.I ask this because I noticed the website braemere.com.au had to be typed into a web browser and entering the IP which is 202.47.5.7 did not take me to the website.

View 5 Replies View Related

General :: Find Statement For Multiple Folder Names?

Jan 21, 2010

right now i'm doing a find . -type d -iname "z*" to find all folders who's name starts with z or Z.

Is there a way I could with one command find all folders who's name starts with the letters M through Z, without having to do the same command over and over and just changing the letter each time?

View 15 Replies View Related

Networking :: Nslookup Returning Multiple Names On RedHat With Windows AD

Jun 11, 2010

Recently I installed RedHat Enterprise 5 on a windows machine. The machine is configured to use DHCP, but I have been seeing some strange behavior if I do nslookup on the machine's IP:

[someuser@lin01 mydir]$ nslookup 10.5.x.x
Server: 10.10.x.xx
Address: 10.10.x.xx#53
x.x.5.10.in-addr.arpa name = xyz.something.
x.x.5.10.in-addr.arpa name = lenovo-d1690047.
x.x.5.10.in-addr.arpa name = pqdlds.
x.x.5.10.in-addr.arpa name = lin01.mydomain.com.

Where only the last entry of [URL] is actually correct, how can remove the other entries? I spoke to my IT Manager and he cannot see these stale entries in the DNS (we are using windows AD)

View 3 Replies View Related

General :: Creating Multiple Directories?

Mar 28, 2010

I need to create subdirectories in about 300 existing directories - the subdirectory will have the same name in all 300 existing directories. How do I do this using the mkdir command using a regular expression or globbing?

View 3 Replies View Related

General :: How To Exclude Multiple Directories

May 10, 2011

I am trying to exclude multiple directories when using tar. I can do it for just one directory with exclude= directory.I can also do it for multiple directories by typing that code again and again.As you can see im trying to call this variable that has endless amounts of directories in it seperated by a space.. but when run it doesnt work! It will however work if i just put one directory in the variable. Any ideas?

View 2 Replies View Related

General :: Tar Multiple Directories Into One File?

May 15, 2011

I have found ways to tar a directory and exclude certain directories but is there a way to simply tar multiple directories (they are in the same directory) in to one .tgz file?

View 8 Replies View Related

Ubuntu Networking :: Multiple User Names / Passwords To Access Same Shared Directory?

Mar 18, 2010

I have an ubuntu server set up in which i would like my shared media directory to be accessable with multiple usernames / passwords because I use my admisistrator username and password for samba as well, but I do not want to give out that password to all clients in my house. And, I would like to have write permissions but keep other users to read only. Is this possible or do i need to just make one separate username / password for samba sharing?

View 1 Replies View Related

Ubuntu :: Moving Files From Multiple Directories?

Apr 16, 2010

I have a directory tree with lots of folders. I need to gather all files of same type, say .txt, and place them in a different folder all by themselves.

I know I can use the mv command, but it won't let me go through all the subdirectories of my folder, just the current one. How can I search through all subdirectories for all .txts or whatever and move them to a folder of my choosing?

View 2 Replies View Related

General :: Checking If Multiple Directories Exist?

Apr 27, 2011

I have one file called test.sh and in that file I have the below code. All this code is, is paths to three directories (as you can you can clearly see!).

Code:
#!/bin/bash
BACKUP="Documents /bin /sbin"

Now I have this other file which reads the directories (by using $BACKUP) and creates a tar file of everything in that folder. But what I am unsure of what to is create a bit of code that will simply look in test.sh, read all the directories and print a line saying either they all exist or some are missing. If possible it would be good to know which directories are missing too!

I have fiddled around with using -d but I can only get it to work for one directory or manually having to write out each directory.

View 4 Replies View Related

General :: Copying Doc Files From Multiple Directories To One?

Feb 1, 2010

I have 60+ directory's each containing multiple .doc files. I need to move them to a single directory and keep their file name intact. I don't think cp will do that with out listing all the file names. I was thinking of something like: cp -r /dir/*.doc /newdir . Or should I use a combo like find -type *.doc|cp /newdir?

View 5 Replies View Related

General :: How To Exclude Multiple Directories In Awk With Find?

May 20, 2010

I found a script on webmaster world that mostly does what I need it to, but have been making modifications to tailor it to my specific needs.I know that //..*/ tells awk to ignore hidden directories, how do I define more directories to ignore? (i.e. temp, var, etc)? I've tried playing with prune before the awk command with limited success...I know that there are many ways to do the same thing and keep running into brick walls.

View 11 Replies View Related

General :: Remove Multiple Directories In Different Locations?

Mar 15, 2010

I have hundreds of directories in various subdirs that I need to remove. I want to remove all of these dirs, but can only find solutions on how to do remove files (or how to remove subdirs from within the current dir).

I think I need something like

find -iname 'testfile*' | xargs rm -i

where I want to remove every directory that contains the word 'testfile' within the directory name. I know xargs wont work for dirs,

View 9 Replies View Related

Ubuntu :: Deleting Multiple Folders In Different Directories With Filezilla?

Apr 21, 2011

So I have a share hosting account with 60 sites all running wordpress.

There is a plugin I want to delete from all 60 wordpress sites.

The plugin is in the same path in all 60 sites.

mysite.com/wp-content/plugins/carter Is there a way I can search the entire home directory with filezilla or another ftp and delete every folder with that name in every site or I have to do it the tedious 1by1 sucky way?

View 4 Replies View Related







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