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


ADVERTISEMENT

Software :: What Program To List All Installed Packages In A Text File And Compare 2 Lists

Feb 22, 2011

I need to get names of all installed packages in 2 machines and save them in 2 text files, then I want to compare these 2 files to know the differences between 2 files and from that I could know the differences between 2 machines. Is it possible to do that and what program I could use?

View 2 Replies View Related

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

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

Software :: Equivalent Of Uuname - Lists The Names Of Systems Known To Uucp

Jan 3, 2011

The uuname command available in solaris lists the names of systems known to uucp. Since uucp is also available in linux, is there any command which lists the names of systems known to uucp in linux? I 'm using fedora9 linux machine.

View 1 Replies View Related

Ubuntu Servers :: Create Directories From A .txt File?

Feb 8, 2011

quickest way to create directories from a .txt or .csv file. A single command would be great but I can use a script as well.

The windows equivalent would be:

FOR /F %n IN (newfolders.txt) DO MKDIR %n

View 7 Replies View Related

General :: Compare Two Directories In Different Servers?

Mar 28, 2011

I have a requirement. I need to write a shell script which will compare two directories residing in two different servers (SERVER A and SERVER B) and list out the discrepancies if found any. Script will be running from SERVER A.

View 3 Replies View Related

Ubuntu :: Create Text File Which Lists Sales - Bash Script Shows Total Sales Of Each Month?

Mar 8, 2011

Firstly i'd like to introduce myself before I ask my question, i am currently studying a "Network Operating System 2" course, and in the syllabus the professor decided to use Ubuntu Linux for us. This is a first for me and I am truly greatly interested in the OS. It seems like a solid system once you get to know the deep foundations of it. The professor has already given us an assignment, but I feel its not fair as its just a bit too much from out of what he taught us .. He did not teach us what he is asking for. He asked us to create to a text file which lists the Sales from two Salespersons, and each one will have an amount for each month .. So 12 entries for each salesperson.

Using that text file, we should write a bash script which would read the values from the above text file, and produce a "Monthly Sales" text file, which shows the total sales of each month (combined from both the salespersons). I would like to ask for some guidance, some help on how to start. It's just that he didn't teach us any commands about this matter.

View 9 Replies View Related

Fedora :: Cannot Compare Two Directories And Print Files

Sep 12, 2010

I have to write a script that accepts two directory names (JIIT, JUIT) as positional parameters and checks which files are identical in both directories and files having same contents are also considered as identical in same directory. I tried using diff:

#both directories contain three files...file1, file2, file3
echo "Enter the directories:"
read d1
read d2
cd $d1

if diff file1.sh file2.sh > /dev/null
then echo same 1,2
else echo different
fi

if diff file1.sh file3.sh > /dev/null
then echo same 1,3
else echo different
fi

if diff file2.sh file3.sh > /dev/null
then echo same 3,2
else echo different
fi

cd ../
cd $d2
.....

I used the same code in the other directory for the three files. This is not running. I also want to know what to do when I need to compare files from different directories. i.e., JIIT, JUIT..

View 3 Replies View Related

General :: Create Directories From A File List?

Jun 30, 2011

I am trying to write a script to pick the directory name from a list of file. Here is a detailed picture.Have a file name LIST which contains the follwing for example/apps/oracle/product/test1/apps/oracle/product/test2/apps/oracle/product/test3I need a script that reads these line from LIST and creates foldersin /apps/oracle/product/test1/backup/date/test1 after reading the first line
/backup/date/test2 after readin the second line/backup/date/test3 and so on.

View 15 Replies View Related

Software :: List / Find / Compare The Program Versions On A Centos System Against Redhat / Centos Errata / Security / Bug Lists?

Mar 30, 2011

Is it possible to list/find/compare the program versions on a Centos system, against Redhat/Centos Errata/Security/Bug lists? Sort of looking for a way to make sure that all the packages on a system are ok, and not a security risk-- Without having to update every package. A pseudo code, in my mind is:

[Code]...

View 2 Replies View Related

General :: Command Line - Create Directories That Don't Exist While Creating A New File?

May 8, 2010

I can do:mkdir messages and then: touch messages/hello.txt Is there a command that will do both - create the directory if it doesn't exist, and then the empty file? Something like: touch -p messages/hello.txt

View 1 Replies View Related

Programming :: Script To Create .menu File (recursively Read Directories)?

Nov 4, 2010

I've found myself in the situation where I need to create a menu in gnome/kde for a directory structure full of documents.The directory structure looks like this:

Code:
DOCS/
.. REFERENCES/

[code]...

View 1 Replies View Related

General :: Create A Backup Directory And 3 Directories Within That And Some Files Within The 3 Directories And Then Back Them Up Ot Restore Them?

Dec 19, 2009

i am in need of linux help. iam at college and i need this back/restore script to pass this final part of an assessment. i require a backup script that will not only backup but also restore files to the relevent directories. e.g. users are instructed to store all wordprocessor files in a directory named wp. so i am needing to create a backup directory and 3 directories within that and some files within the 3 directories and then back them up ot restore them. l know i should/have to do this myself by been trying to get/understand info for the last few days and came up with zero.

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

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

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

Fedora :: Create A Form In Bash That Would Display Multiple Radio Lists?

Feb 4, 2010

I am attempting to create a form in bash that would display multiple radio lists with an OK and cancel button on the bottom. I tried using the command line tool dialog, which is really nice. But it won't let me do multiple radio lists on the same form.

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

Red Hat :: Correct Process To Create Network Names On RH?

May 27, 2010

I am playing around with RH for the first time. I have two applications which insist on using names for network ranges - so they need /etc/networks. I created one on the RH box as suggested via google but the apps still cant see the names (basically they are not reading /etc/networks). What is the correct process to create network names on RH? Basically the equivalent of solaris /etc/networks?

View 4 Replies View Related

Ubuntu :: Lists Files With Both File Size And MD5 Hash?

Jan 20, 2010

Is there any utility that can provide a list of all files, and both the file size and md5 hash value. Preferably also including other hash values.I've got 1.5 TB of files to go through, and delete duplicates..Neither fdupes or fslint are up to the task --- both claim files to be duplicates, when they definately are not. (Movies, and OOo documents are not identical, even if one is the script for the other, which in this case is not the case. Both fdupes and fslint claimed that those two files were identical. (And yes, I did look at them.

View 5 Replies View Related

Ubuntu :: Package Lists Or Status File Could Not Be Parsed?

Jul 22, 2011

I have not ran into this before. I did a new install of 10,04 and was adding programs. Then software center and Synaptic stopped working. error message said it was most likely due to unmet dependencies. I googled fixs which most all ran some sort of "apt-get" command. I can't run those because as soon as it gets to "Reading package lists", I get this error.Read error - read (5: Input/output error)The package lists or status file could not be parsed or opened

View 2 Replies View Related

Ubuntu :: 10.4 - Package Lists Or Status File Could Not Be Parsed

Apr 24, 2011

This is a error with my ubuntu 10.4 when I try to update it.
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 25165824. (man 5 apt.conf)
E: Error occurred while processing bomberclone (NewFileDesc2)
E: Problem with MergeList /var/lib/apt/lists/archive.offensive-security.com_dists_pwnsauce_universe_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.
W: Duplicate sources.list entry Index of /ubuntu lucid/partner Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_lucid_partner_b inary-i386_Packages)
W: Unable to munmap

View 2 Replies View Related

Ubuntu :: Create A Directories That Always Stay On Top?

May 6, 2011

have been working how to do this for a while finally getting around to asking....

as a long time windows user I have used a trick of creating directories that will always be the first ones displayed by using an _foldername model, for ex:

_temp
A dir
B dir
temp

assuming the four above are directories that is how they are sorted by default in windows and I commonly use this technique for special folders.

for my virtual machines folder in windows looks like this:

_base
LX-Ubuntu9.1
LX-Ubuntu11.4
XP-TestVM
...

where I put base virtual machines in _base and it makes it easy to separate them for all the other folders which are virual machines....SO....

in Ubuntu, I cant figure out a character or way to ensure this type of behavior, for example if I create a _base folder it shows up after a dirs and around the bs etc...

any know a way to create a dir with a special char that will ensure it stays on top?

View 3 Replies View Related

Ubuntu :: E: The Package Lists Or Status File Could Not Be Parsed Or Opened

Dec 5, 2010

E: Read error - read (0: Success)
E: Problem closing the gzip file /var/lib/dpkg/status - close (0: Success)
E: The package lists or status file could not be parsed or opened.

View 1 Replies View Related

Ubuntu :: The Package Lists Or Status File Could Not Be Parsed Or Opened?

May 22, 2011

I keep getting this messageCould not initialize the package informationAn unresolvable problem occurred while initializing the package information.Please report this bug against the 'update-manager' package and include the following error message:'E:Encountered a section with no Package: header, Eroblem with MergeList var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_natty_main_bina ry-i386_Packages, E:The package lists or status file could not be parsed or opened.'

View 2 Replies View Related

Ubuntu :: Lucid Goes To Sleep Irrespective Of The Setting

May 16, 2010

I am using ubuntu 10.04 . Even though i have set power options where it says "put power options to sleep" to "never"the computer goes to sleep after 5minutes. I again have to give the password to unlock .

View 1 Replies View Related

General :: How To Compare Two Columns In A File

Mar 29, 2010

I am trying to write a script which compares a log file with reference file. The log file has a table, the LHS of the table are constants strings and RHS of table values changes if there are any changes in configuration.code...

Here I am looking for a script which compares test.log file ( whose RHS data-types are known prior whether it is digit or string) with test.Ref which is reference file for test.log file. It will be really helpful for me if any of you give some idea about writing this script.

View 2 Replies View Related

Software :: Compare $var With Content Of File?

May 20, 2011

I got a file with a list of subnets like this:

10.50
10.51
10.62
10.121

then I cnf=`ifconfig` thus giving me the config of the NICs.after that I want to compare the $cnf to see if the value of it is listed in the file and if it is do things.There might also be something better to use then the 'ifconfig'but it worked so I just stuck to it First I just had one subnet but now it's starting to grow and I wanna make a list instead of having them all listed in the if-statement.

View 14 Replies View Related







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