General :: Merging Two Files From Two Different Directories?

May 14, 2011

I'm totally new to Linux and this website. I was wondering if anyone had or could help me create a shell script that would merge two files from two different directories and then have that new merged file in a third differnt directory.The merged file would need to eliminate duplicates and sort the contents.

View 6 Replies


ADVERTISEMENT

General :: Merging Avi And Mp3 Files?

Jun 9, 2011

i am totally new to terminal!!! i extracted both the audio and video from an mkv file. both can be played back without any problem, yet i can't merge them into a single one

View 9 Replies View Related

General :: Splitting And Merging Two Files?

May 29, 2010

how to split two files like

big.zip.1
big.zip.2

then, my second is how to merge them like windows

in windows, i can use copy /b

in linux,

cat big.zip.1 > big.zip
cat big.zip.2 >> big.zip

View 1 Replies View Related

General :: Merging Columns From Different Files?

Oct 10, 2010

I have three files with the following structure:

file1
1 2 3 4
5 6 7 8

[code]...

View 4 Replies View Related

General :: Merging Files With Different Number Of Rows Using Awk?

Apr 18, 2011

Does anyone have a solution for merging files if the number of rows in the two (or more) files is non-equivalent.To exemplify, how about merging the following 3 files:

file1:
1
2

[code]...

View 8 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 :: How To Store Files / Directories In Different Different Directories?

Mar 23, 2011

I am writing a script, in that my requirement is, if all the fill types stored in one directory from that we need to separate different different directories based on the file types.

for example in a directory(anish). 5 different types files
1- directory
2- .txt files
2- .sh files

like that and my requirement is the (1- directory is moved to one new directory(dir) which we are given in the script)and (2 .txt files are moved to another new directory(test) which we are given in the script)and ( 2 .sh files are moved to another new directory(bash) which we are given in the scrip)finally the directory anish should be empty..using bash script.how it is possible !!

View 7 Replies View Related

General :: Merging And Sorting Multiple Files With "sort"?

Jun 3, 2010

I have a bunch of text logfiles in the following format:

ID (17 characters)
Timestamp (14 characters YYYYmmddHHMMSS e.g. "20060210100040" -> 2006/02/10 10:00:40)
Random data (? characters)
end of line

The files are already sorted by timestamp.I need to get 1 log file with all the logs from multiple logs files, sorted by timestamp. Note that the log files are really huge, around 3-4G each (and there are dozens of them) I tried the following command:

sort -s -m -t '|' -k1n,1n +17 -o data_sort.txt *.TXT

Here is how I ended up with this command:

-s : don't bother with tie results
-m : merge all logs files
-t '|' : there is no | in my logs, so the whole line should be field 1

[code]....

Actually... it fails miserably. The output file data_sort.txt is just the concatenation of all files, not sorted at all.

View 4 Replies View Related

OpenSUSE Multimedia :: Merging Video Files?

Jul 4, 2010

I would like to know which software can merge different videofiles (mpg, avi) into 1 file.
Kino makes a DV-file, which is to big.So I search the equivalent of Microsoft Movie Maker.

View 5 Replies View Related

General :: Creating A Script To Move Or Copy Files Into Multiple Directories Below The Files?

Aug 25, 2009

How can you create a script to move or copy files from a main directory into multiple directories below the main directory.

View 7 Replies View Related

Software :: Merging Files Together Based On Latex Syntax?

Mar 4, 2010

I have a latex code file which links itself to many other latex files. The syntax is as follows:input{*path of file to be inputed*}The path is relative to the current working directory, so if my file is stored in /home/kevin/mybook.tex and I want to include a file in /home/kevin/latexstuff/copyleft.tex I simply write:input{latexstuff/copyleft.tex}

The latex compiler includes these files just as if they had been copied and pasted into the main latex file at the point specified. My problem is that I have a document which depends on quite a bit of these input commands,ut I am trying to use a latex preprocessor (ratexdb, adds database fields to your latex documentshich does not support input commands, leaving my file only half processed.So I was wondering: is there any easy way to parse through my main file, detect only the input commands, interpret the syntax and include the files specified (where specified)nd produce a second, populated file, which can then be processed by ratexdb?

View 2 Replies View Related

General :: Recursively Cp All Directories, Files And Hidden Files?

May 17, 2010

Ubuntu 10.04

I want to copy all directories, files, and hidden files and hidden directories with one command. I want these items to replace any same items in the target directory.

I have tried several things, such as:

cp -r *
cp -aR *

but I only seem to get visible files and directories. Obviously, I am missing something. (A brain, probably....)

View 9 Replies View Related

Ubuntu :: Bookmark Manager - Merging Files Into Single Collection

Jun 2, 2011

During the past eight years I've used a number of computers with different operating systems and browsers. On each one I made a habit of using the bookmark utility of each browser and saving the bookmarks file. I never ensured the continuity of the bookmark file - with each new computer I started a new bookmark file. Even when I was reinstalling the operating system I didn't import the old bookmark file in the newly installed browser: I've always started a new bookmark file. As a result I have tens of bookmark files for Firefox (json format - some kind of xml?) and IE (html file format?) each one containing hundreds or thousands of saved links. I have also some files containing links in text format (created usually when I was using someone else computer).

I would like to be able to manage this bookmarks files by using some sort of "bookmark manager" software. The "bookmark manager" should be able to merge the bookmark files into a single collection/file. It should be able to identify and remove the duplicate entries (I have timely versions of the same bookmark file) and also it should be able to group the entries/links on categories (for example the bookmarked articles on codeproject.com should be grouped under the codeproject category). Not to mention that it should provide a search facility to quickly locate the interesting bookmarks. I couldn't find such software in ubuntu software center. Do you know something that even comes close to what I need?

View 9 Replies View Related

General :: Remove Directories That Only Contain .txt And .log Files?

Aug 8, 2010

I'd like to remove all directories of a certain depth that don't contain .txt or .log files -- is this possible? So far I have: find ~ -mindepth 3 -maxdepth 4 -type d -exec rm -r '{}' ; Is it possible to add in "only if the directory doesn't contain .txt and/or .log files"? Or do I have to start learning perl to do that?

For example:
dir 1:
hello.txt
runme.sh
dir 2:
runme.sh
oct12.log
[Code]....

View 13 Replies View Related

General :: What Kinds Of Files Are Stored In The Directories

Mar 12, 2010

3.State what kinds of files are stored in the following directories. Give any ONE file that can be found in these directories.

a. /etc/
b. /proc/
c. /sbin/

View 2 Replies View Related

General :: In What Order Are Files And Directories Copied When Using Cp -R?

Jun 26, 2011

If I execute the following command:
cp -R /myfiles /mydestination


If myfiles contains several sub-directories and files, in what order will they be copied? For example, directories might be named 0123a, 9993c, myfolder, xfolder.

They are not copied in alphabetical order OR in date order OR in the order they appear when using a standard ls command as far as I can tell, so what actually does determine the order?

Edit:
I am trying to determine the order that the cp command uses in order to determine how far along my copy command made it before it stopped. For example, I was hoping to be able to determine it copied 3 of the 4 directories successfully.

View 1 Replies View Related

General :: Removing Files Or Directories Recursively

Jan 29, 2010

The rm command man pages discusses removing files or directories recursively. So what is meant by deleting a file or directory recursively? And what are some reasons for doing so?

View 3 Replies View Related

General :: Viewing Backup Files But Only In Some Directories?

Oct 26, 2010

I backed up my Laptop with a script, as follows:

Code:

#! /bin/bash
sudo
growisofs -Z /dev/dvd -dvd-compat -r -v /home

I then installed a new version of Ubuntu 10.04 from disk and copied the files in /home from the cd to the hard. I am able to open, view etc. all the files in most directories except those in /home/documents. There are text files created by gedit, OOWP and several PDF files. I cannot open or view these files, depending: gedit and pdf files gets a Err.Msg. "Don't recognize file type" (it is clearly marked PDF) . The OO files look like rows of 'high bits' and a dialogue box opens giving me the options to change Char. Set, Font, Language, Paragraph break.

View 6 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 :: Remove Files In All Directories Owned?

Jan 8, 2010

Is there a way to do the rm command where I can remove files by owner. I run the standard ls -al command and I want to be able to remove the files that are owned by me in that current directory. One other step how can I remove files in all directories owned by me. I did the google search first guys and a majority of the pages just dealt with the basics like rm -r

View 5 Replies View Related

General :: Make A List Of Directories And Files?

Jun 3, 2011

My system is centos 5.5, and I need nobody:nobody's directories and files under data.

There is a directory named "data, and this directory has so many directories and files generated by web program. Most of them is nobody:nobody.

I want to to make a list of these nobody:nobody directories ans files.

Is it possible to make a list of these directories and files?

View 1 Replies View Related

General :: System Call To Know Files And Directories In PWD

Mar 3, 2010

I am searching for any system call similar to "ls" command we use in shell. My requirement is knowing the files and directories in curent working directory and process them based on there type. Here as of now I spawn another procees with system command like system
("sh ls -l | grep ^d | awk '{print $9}'").

Instead of this I want to use any system command where I can capture this information directly into my local character buffer. My opinion is that system calls will not spawn another process as a result less time it takes, another reason is once I use the system command again I need to capture the information to a local file then again read it into local buffer. I want to avoid the file manipulation here.

View 1 Replies View Related

General :: Using Chmod(), Function To Set Permissions For My Files/directories?

Feb 16, 2010

I am using chmod(), function to set permissions for my files/directories.How can I set -R flag for it???

View 4 Replies View Related

General :: How To Use Find To Copy All Found Files To A New Name In Their Same Directories

Feb 23, 2010

I've got a simple command that does almost what I want.

The following will locate all files with a suffix of '_compressed.swf' and copy each into its same directory with a '.bak2' appended:

However, I need to replace '_compressed.swf' with '_content.swf' I'd like to use find, rather than recursive flag on cp for consistency.

Objective
In: /content/somefile_compressed.swf
Out: /content/somefile_content.swf

View 3 Replies View Related

General :: Setting Differing ACLs On Directories And Files

Aug 25, 2010

Quick ACL question: I want to set up default permissions for a file share so that everyone can rwx all of the directories and so that all newly created files are rw. Everyone who is accessing this share is in the same group, so this isn't a concern. I have looked at doing this via ACLs without changing all of the users' umasks and such. Here are my current invocations:

setfacl -Rdm g:mygroup:rwx share_name
setfacl -Rm g:mygroup:rwx share_name

My problem is that while I want all of the newly created sub-directories to be rwx, I only want newly created files to be rw. Does anyone have a better method to achieve my desired end-result? Is there some way to set ACLs on directories separately from files, in a similar vein to "chmod +x" vs. "chmod +X"?

View 2 Replies View Related

General :: List Directories And Number Of Files Inside Them

Mar 19, 2011

I'm looking for a way to produce a list of all the directories in the current working directory sorted by the total number of files that are contained with them.

Initially I though that Nautilus could be used for this, but then I realised it doesn't count files in the sub directories.

The best I've got for a command line solution so far is this

Code:

The use case for this is a situation where a user has a quota applied to their home directory which limits the number of files they are allowed to have and they have exceeded that limit.

View 4 Replies View Related

General :: Copy Wildcard Files From Directories For Matching

Feb 11, 2011

I have 2 massive duplicate dirs of the same format as below:
dir1
subdir1
file1
subdir2
file1
subdir3
file1
...

Dir2 is the same, but it has some newer files of the same name. I want to copy all file1's from Dir2 to the same name and folders in dir1. So basically something like:
cp -pr bkpDir1/*/*-big.gif Dir2/*/*-big.gif

This works for singular cases:
cp -pr bkpDir1/uniquesubdir/*-big.gif Dir2/uniquesubdir/*-big.gif

But not for wildcards:
cp -pr bkpDir1/subdir*/*-big.gif Dir2/subdir*/*-big.gif

Anyway the aim is to do the first cp above, I have tried a few options using find. In trying to show an example stumbled upon a way that worked, while in dir2:
find */*-big.gif | xargs -i cp -rp {} ../dir1/{}
Sure there are better ways also...

View 1 Replies View Related

General :: Identify Which Files/directories Are Sitting On Each Drive?

Feb 5, 2010

I have two hard drives, sda and sdb. Windows resides on one and Linux on the other. Before I reinstall Linux from scratch, I want to make sure I know which is which so that I don't end up erasing my windows drive. How can I identify which files/directories are sitting on each drive? I.e. how do I find out the mount points of /dev/sda/ and /dev/sdb/?

View 9 Replies View Related

General :: Move Some Of The Files From Multiple Directories To One Location?

Jun 17, 2010

I'd like to move a selection of files from all the sub-directories within an overall directory to a single destination. I don't want any of the directory structure, just the files themselves. This is what I tried so far:

mv /dir1/*/igs*.sp3.Z /dir2

There are other .sp3.Z files in the * directories within /dir1 but I just need the ones that start with igs..

View 4 Replies View Related

General :: NTFS Mounts But Can't Remove Files/directories?

Feb 9, 2011

this is my first post and I am not sure if this belongs here or in hardware.Now for the main post!

setup:
Dell Demension 4400
Intel(R) Pentium(R) 4 CPU 1.60GHz, 1 cores

[code]...

View 4 Replies View Related







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