Ubuntu :: Delete All Files Listed In A Text File?

May 26, 2010

Through various Windows reinstalls and switches within Linux distros, I have a massive amount of duplication within my music archive (on the order of 7+ dupes of each file). Now, I found a lovely program called "fdupes" and was able to build a list of all the duplicate files, and I'm trying to use "xargs" to remove then. However, when I try and run the command "xargs -0 --arg-file="dupes.txt" rm" or "xargs -0 rm < "dupes.txt"" it give me the following error: "xargs: argument line too long".

how perhaps a different way of accomplishing the same thing?

View 9 Replies


ADVERTISEMENT

Ubuntu :: Moving Files Listed In Text File?

Jun 14, 2010

I've got a text file listing 1823 files that need to be copied from their current locations, i.e.To another folder, any idea how I should do this?

View 4 Replies View Related

Ubuntu :: Scripting - Copying Files Listed In A Text File ?

Apr 15, 2010

I've got a text file with a list of .gz files, these .gz files are in various sub directories of one parent directory and I've hacked this little script together to copy them from their current location to a new one and spit out any it can't find to "/home/user/not_found" but for the life of me can't get it to run properly!

The shell script as it currently looks:

Code:

View 4 Replies View Related

Programming :: Sed Delete Lines From File One If Regexp Are Listed In File Two?

Sep 17, 2009

I am trying to delete lines of a file if they contain text that is present on another file. For example

> cat one.txt:

a
b
c
d

[code]....

I get the following output:

> ./test.sh one.txt two.txt
a
b
d
e

[code]....

View 6 Replies View Related

Programming :: Delete Line Of Text From Text File Via Shell?

Jan 13, 2010

I have to delete a certain line of text from the a textfile via ubuntu's shell scripting.I have done research, and it seems that most people advocate the usage of sed /d option. sed makes does not edit the text file. Hence, most options I discovered involved the use of a temporary variable/textfile and then overwriting the old file with the temporary new file. Is there anyway whereby I can bypass the use of temporary storage containers? I hope there is any magical combination of commands to edit the file directly.

View 3 Replies View Related

OpenSUSE :: Possible To Remove Multiple Packages Listed In A Text File?

Sep 15, 2011

Is it possible to remove multiple packages listed in a text file? Similar to "cat orphan.txt | zypper rm" or "zypper rm <orphan.txt." Neither worked.

View 8 Replies View Related

Red Hat / Fedora :: Edit A Text File To Delete All Commas In The File?

Jan 4, 2011

i want to find a command line way to edit a text file to delete all commas in the file. i do not want to replace them w/ anything.

View 2 Replies View Related

Fedora :: Delete Character MS-DOS Text Files On System?

Aug 17, 2011

We had seen some time ago, various tricks to remove the character MS-DOS text files on Linux. Here is a new trick to do this directly from the vim editor.
to convert a file opened with vim in UNIX format, simply use the following command code...

View 2 Replies View Related

Software :: Find And Delete String In Text Files?

Mar 6, 2010

I have a series of file names in a text file that I generated by running
Code:

bash-4.1# ls -alt *.txz | awk '{print $8}'
and then copy pasting the output. All of these file names have the version number
Quote:
-4.4.1-x86_64-1alien.txz

I just want a method to remove that version number from all the filenames so that I can then add all the packages without version numbers to a blacklist file.

I've tried kwrite and mousepad and both have a search feature and a replace feature but I haven't been able to just have the text removed successfully.

View 3 Replies View Related

General :: Does Tar Provide Method To Tar Up Only Files Listed In Particular File?

Feb 4, 2011

I have a file that is a list of other files, lets say FilesIWantToTar.dat. I want to say something along the lines of tar -c input-file=FilesIWantToTar.dat archive.tar or similar. Does the tar utility provide this functionality, or do I need to write a simple script?

View 1 Replies View Related

Software :: Use Sed To Include A Text File In The Beginning Of Other Text Files Inside A Folder And Its Subfolders?

Jun 1, 2010

Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.

View 4 Replies View Related

Software :: Delete Top Lines Of A Text File Until A Word Is Met?

Jul 7, 2011

I need to chop of the top 30ish lines of several log files until a line starting with "Initialization completed."The trouble is that it's not always the same amount of lines that need to be deleted, and they don't always contain the same information, which is why I would need to delete everything priorhe line starting with "Initialization completed."Right now I have a little script I wrote based on looping each file through several "grep -v" commands with each known pattern of lines I want to ignore, but it is tedious and I have to inspect each file afterwards to make sure nothing is left from above "Initialization completed

View 3 Replies View Related

Ubuntu :: When Delete Simple Text File / Trash Icon Not Change

Mar 6, 2011

I have installed KDE 4.6.1, on distribution Ubuntu 10.10 . But i have problem with trash icon. Even when i delete a simple text file, trash icon not change, shows empty icon. When I open trash directory location from dolphin, left side shortcuts, it shows empty directory.Is it a bug? Where is my deleted file gone?

View 4 Replies View Related

Ubuntu :: Delete Files From Another File System?

Oct 24, 2010

When I boot up my Ubuntu system I get the following error message:Install Problem The configuration defaults for Gnome Power Management have been installed incorrectlyI found the following posting and this describes what also happesystemhttps://answers.launchpad.net/ubuntu...uestion/111256I've created a recovery disk by using a memory stick from which I can boot. I can mount the old filesystem (HD). When I navigate, with the file browser, into one of the folder on the the HD and try to delete messages I get the following error message - 'Error removing file: Permission denied'.I guess I need to log / tell those files the root password from the system installation as per the version on the HD. But how do I do this?

View 2 Replies View Related

General :: Delete A File Or Certain Files Using Php?

Apr 28, 2011

i wanna ask on how to delete a file or a certain file in linux by using php or in other word by using web browser. example i want to delete the file inside /var/www/cgi-bin/ with browser.

View 14 Replies View Related

General :: How To 'find' Text Listed On Terminal Screen?

Dec 21, 2010

Since I see on my Centos 5 system, when using the Gnome Terminal, there is no 'Find' feature, do I use grep to search the output on Gnome Terminal?

I see grep syntax is:grep search-term file

But what do I use as the 'file' when what I want to search is the contents of the gnome terminal screen?If there is a good terminal program that does have a 'find' feature, let me know.

View 2 Replies View Related

Programming :: Perl - Delete Line From Text File With Duplicate Match At Beginning Of Line

Apr 1, 2009

Was wondering if any perl guru's could help me with a quick log file adjustment. I have a text file that looks like so (tabs and newlines are revealed so you can see what separates the data):

There are maybe 100 lines of text in this file at any given time. I need to delete all duplicate lines only looking at the first bit of text prior to the first tab. It doesn't matter which one gets deleted as long as there are no two lines that begin with that same text at the beginning before the first tab. So in this example, either the fist line "1234" or the last line "1234" would need to be deleted. I already have code in my script that opens the files - I just need the code to read the text into an array and the part that would find matches based on the above criteria, and make the deletions.

If it would be easier, I can even do a system call and use SED (v4.1.5) and/or AWK (3.1.5) instead.

View 7 Replies View Related

Ubuntu Security :: Delete Files Off Journaling File-system?

Feb 19, 2010

I have some very confidental files on my computer that I store such as credit reports, and other things. I always encrypt them with GPG, but there still is that original non-encrypted file left that needs to be deleted. I looked into tools like wipe, and shred but they all say that it really doesn't help on journaling filesystems directly on their man page.

I am not asking how to wipe the whole drive with dd or anything, but I am simply asking if there is a tool that'll delete a single file securely.

View 9 Replies View Related

Ubuntu :: Iso File Extraction - Go Through 3500+ Rom Files And Delete Added ;1 To Nes Extension

Aug 15, 2010

I downloaded an ISO of some nes roms and used the archive manager to extract the files. It extracted them but it added a ;1 to the end of the extension. I don't want to go through 3500+ rom files and delete the added ;1 to the nes extension. How can I prevent this in the future?

View 3 Replies View Related

Software :: Join 2 Text Files Based On First Number Present In Every Line Of The 2 Text Files?

Jan 22, 2010

I have 2 text files : file1.txt and file2.txt

cat file1.txt

15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces

cat file2.txt

2 this is sentence1file2
6 this is sentence2file2
54 this is sentence3file2

I would like to join these 2 files. The result should look as follows :

cat joinedfile.txt

2 this is sentence1file2
6 this is sentence2file2
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
54 this is sentence3file2

==> so the joined file must be sorted on the first number. Any ideas how this can be achieved ?

View 4 Replies View Related

Software :: VFat File System - No Permissions To Delete Files

Feb 21, 2010

I have the cowon iAudio7 music player with vfat file system and increasingly running into permission problems when I try to delete files. Unsurprisingly I am now running out of space. I am figuring if I could somehow mount it onto a folder in my home partition I will have full permissions. The problem is the drives name which is exactly with space: So even if try to delete files in the terminal I don't know how to cd into:

Code:
/media/I AUDIO7
note the space between I & AUDIO7.

View 14 Replies View Related

Ubuntu :: Convert A Text File Into Smaller Files?

Dec 3, 2010

I have a gedit text file 2.2MB. I want to convert it into two orhree smaller files/volumes, so I can upload them seperately to web pages. Does anyone know a quick and easy way to do this?

View 4 Replies View Related

Programming :: Shell Script To Delete Files Which Location Should Be Read From Log File

Jun 26, 2010

I have 2 external hdd in wich I have all my files. yesterday, I have copied all the files from hdd2 to hdd1 and I want to eliminate duplicates so I used FSLint to find them,now I want to make a shell script to delete all the files/entries (read from the log file) that begin with.

View 14 Replies View Related

General :: Ubuntu - Search Text In Files And Display File Name?

Mar 30, 2011

I am using find some_dir -name "*.some_ext" | xargs -l10 grep "some_expr"

to find files in folder, but I just want to display the file name but not all file content. Any solution?

View 2 Replies View Related

Ubuntu :: Sort The Output To A Text File So That It Prints To The Text File At 1 Process Per Line?

Feb 6, 2011

im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.

echo $(ps aux) >>out

The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.

View 5 Replies View Related

Programming :: Finding A Shell Script To Delete Files Which Location Should Be Read From A Log File?

Jul 16, 2011

I have 2 external hdd in wich I have all my files.... yesterday, I have copied all the files from hdd2 to hdd1 and I want to eliminate duplicates so I used FSLint to find them, now, I have a txt file that looks like this:

Code: /media/My Book/!!!MIS DOCUMENTOS/Documentos/2 sep2003-jun2009 USB/!TESIS/TESIS/TESIS CVT LABVIEW Y CODEWARRIOR/LabVIEW85RuntimeEngineFull.exe /media/My Book/HDD_Toshiba/Borrable/Pen_Drive_4GB/Tesis/Super CD de la tesis/LabView/LabVIEW85RuntimeEngineFull.exe multiplied by millions of entries...

now I want to make a shell script to delete all the files/entries (read from the log file) that begin with:

Code:

/media/My Book/HDD_Toshiba/**** Since HDD_Toshiba is the folder in hdd1 (MyBook) that contains all the files from hdd2

View 1 Replies View Related

Ubuntu :: Get Wget To Download Files From A Server Ignoring Some From A Text File?

Jun 29, 2010

I use the

Code:
wget -r -A <extension> <site>

command to download all files from a certain site. this time i already have some of the files already downloaded and listed in a text file via

Code:
ls > <text file name>

How can i make wget to download from the site i want but ignore the filenames listed in the text file?

View 2 Replies View Related

Ubuntu :: Running Executable Text Files And Permissions And File Types

Nov 10, 2010

I checked the 'Run executable text files when they are opened' option in Nautilus preferences. I have noticed that files such as .sh and .bin launch by simply clicking on then (which is great). However I have also noticed that an ordinary .txt and .html file must not be marked as executable in order to launch it in Gedit and Firefox respectively via clicking. Otherwise you must right click and open with every time. What file types need to have execute permissions? What file types never need to have execute permissions?

View 2 Replies View Related

Ubuntu :: Rsync --delete Doesn't Delete Superflous Files

Sep 25, 2010

I am trying to use an old box as backup server. I have tried a couple of possibilities along the lines of:

Quote:

rsync -a --delete --progress --log-file=/home/$USER/info.txt -e ssh /home /etc root@192.168.0.106:/mnt/back

The problem is it does not delete files that has been removed from my local system?
I run the command as root on the local system.

(I realize I should properly not ssh into the server as the server's root but I'm having trouble with the permissions and I want to make sure everything else works before messing around with it)

View 2 Replies View Related

Ubuntu :: Searching WITHIN Doc - Xls - Ppt Files - Grep Is Unable To Locate Text INSIDE File Types

Sep 1, 2011

I am on Ubuntu 11.04 and using Libre Office 3.3.2 to compose new documents and am saving them using .doc, .ppt and .xls files. (due to having to share them with others who are on Windows systems)

I have a lot of doc files and I need to search for text INSIDE these files. I am perplexed with the fact that no search tool is able to search for text INSIDE these file types. "cat" can display them of course, but grep is not able to locate text INSIDE these file types. I even tried to save a .doc file as an .odt file, but no luck. The Applications>Accessories>Search for Files does not search INSIDE doc, xls or ppt with the option "Contains the text".

View 6 Replies View Related







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