Software :: Find Xargs Shred Seems Really Slow

Nov 18, 2010

What am I doing wrong here ? Shredding a directory with files is incredibly slow. If I create a file of similar size it is around 1000 times faster. Filesystem is ext4, OS is Slack current. Looking at top it shows shred's status as 'D' which, according to the man page, means uninterruptible sleep ! Also /usr/bin/time shows around 10 minutes but that time was printed on stdout approx. 7 minutes before the command prompt reappeared !

Code:
[virgil@thunderbird2:~/q] $ du -sh
336M.
[virgil@thunderbird2:~/q] $ find . -type d | wc
160 160 12038
[virgil@thunderbird2:~/q] $ find . -type f | wc
6721 6721 687549
[virgil@thunderbird2:~/q] $ /usr/bin/time find . -type f -print0 | xargs -0 -r shred -zu
0.00user 0.00system 10:11.76elapsed 0%CPU (0avgtext+0avgdata 3616maxresident)k
0inputs+0outputs (0major+285minor)pagefaults 0swaps
[virgil@thunderbird2:~]

[virgil@thunderbird2:~] $ dd if=/dev/urandom of=qwerty bs=336M count=1
1+0 records in
1+0 records out
352321536 bytes (352 MB) copied, 51.6693 s, 6.8 MB/s
[virgil@thunderbird2:~]
[virgil@thunderbird2:~] $ ls -l qwerty
-rw-r--r-- 1 virgil virgil 352321536 2010-11-18 15:13 qwerty
[virgil@thunderbird2:~]
[virgil@thunderbird2:~] $ /usr/bin/time shred -zu qwerty
0.92user 0.78system 0:16.94elapsed 10%CPU (0avgtext+0avgdata 2912maxresident)k
0inputs+2752528outputs (0major+235minor)pagefaults 0swaps

View 3 Replies


ADVERTISEMENT

Programming :: Xargs With Output Of Find

Jul 15, 2011

I'm testing some multi-plat java code and I'm getting a bit frustrated with the Linux tests. I need to run the command:
Code:
$ java -jar /home/developer/TCO/TabletComicOptimizer.jar <file> <args[]>
against all the files that match a specific criteria. I've tried various find syntax and I can't seem to get it right.

Normally I would just create a bash script and populate the results of find into an array and then just enumerate the collection but in this specific case I want to demonstrate this operation at the bash terminal.

I've tried things like:
Code:
~/TCO $ find . -type f -iname "*.cb[rz]" | xargs java -jar TabletComicOptimizer.jar {} 1200x1800 ;
Thinking that the {} is the substitution for each file returned by find but it's not working. How do I execute my java program against each result in the find operation?

View 6 Replies View Related

Server :: Backup One Liner Find Xargs CP

May 25, 2011

I will eventually script this but wanted to know where I screwed up when trying to get this oneliner to work. In a nutshell, I want to created a backup directory, find any files that have changed in the last 48hrs and them copy them to the newly made backup directory.

PHP Code:
date=$(date +%m%d%Y)mkdir -p /home/test_dir/backup$date;find . -mtime 1|xargs -0 cp -r -t /home/test_dir/backup$date

When I do this I get:
PHP Code:
a bunch of junk !#$#$$#! File name too long

I also tried:
PHP Code:
date=$(date +%m%d%Y)mkdir -p /home/test_dir/backup$date;find 
. -mtime 1|xargs -0 cp -r {} /home/test_dir/backup$date

View 7 Replies View Related

Hardware :: USB Hard Disk Not Recognized After Using Shred

Aug 20, 2010

This hard disk is an old Maxtor (60G) extracted from an old computer, working fine. I placed in an enclosure and connected it to my Linux Box (Slack 12.1). It was recognized immediately and mounted automatically. However, before giving away the hard disk, I tried to wipe the data by running shred /dev/sdf At some point, I realized that it was going to take a long time, and aborted the process and disconnected the enclosure. Now, none of my Linux boxes recognize the disk inside the enclosure. Here is the output, when I plug in the usb cable, while using systemrescuecd on my desktop computer:

Quote:
Aug 20 00:58:17 sysresccd kernel: [ 3582.116029] usb 2-6: new full speed USB device using ohci_hcd and address 12
Aug 20 00:58:17 sysresccd kernel: [ 3582.316054] usb 2-6: not running at top speed; connect to a high speed hub
Aug 20 00:58:17 sysresccd kernel: [ 3582.322051] usb 2-6: New USB device found, idVendor=04b4, idProduct=8613
Aug 20 00:58:17 sysresccd kernel: [ 3582.322054] usb 2-6: New USB device strings: Mfr=0, Product=0,
[Code]....

Is there a way to use this hard disk at this point?

View 4 Replies View Related

General :: How To Shred Already Removed File On Modern Filesystem?

Aug 25, 2011

Consider the following:
mount | grep home
type reiserfs
rm -Rf /home/user/over_9000_little_and_big_super_secret_files/
# oops, I should have shredded it instead.


How can I properly and securely "initialize free space" to ensure that no additional info can be restored restored by digging in free space (Preferrably without stopping or disturbing the filesystem much.) Is dd if=/dev/frandom of=/home/qqqqq really secure for this (tails, journal, etc.)?

View 4 Replies View Related

Ubuntu :: Panic Password To Shred Wrapped Passphrase

Feb 8, 2011

I considered making my system run the following if an incorrect password is entered 10 times in a row or a specific dead-password is entered.Code:shred /home/.ecryptfs/$USER/.ecryptfs/wrapped-passphrase.Because ext4 doesn't journal the contents of the file, only the metadata, the file would be shredded and it would be impossible to recover the encrypted home folder even with the password.Is there a simple way I could make GDM check this or would I have to patch and recompile GDM for something like this to work?

View 1 Replies View Related

Ubuntu Security :: Secure Delete/Shred Files And Folder?

Jun 27, 2010

I don't use the Trash bin because it does not really delete things,speaking from a security point Instead, I gotten used to 'shred' and 'secure-delete' .But to move around files, cut-n-paste is very handy.And I was wandering if items from the Clip get stored somewhere ?i realize that they get overwritten again and again in the clipboard but do they also get stored somewhere else?

View 9 Replies View Related

Ubuntu :: Make Shred Command Display Confirmation Before Shredding?

Feb 5, 2011

I use nautilus-action to create a right-click shred command with these parameters.: -f -u -v -z %M

I thought the -v would give me some feedback as well as an "are you sure" dialog before deleting. But when I run Shred it just deletes the file without any feedback and no confirmation beforehand.

How can I get a confirmation prompt to occur before shredding occurs (to prevent me from accidentaly shredding something--sometimes I click the wrong item cause the mouse shifts last second).

Any why don't any icons ever appear on my context menu even though I'm assigning icons?

View 9 Replies View Related

Ubuntu :: Shell Script To Run On Puppy To Shred All Drives Connected To

Jul 11, 2011

I am really new to linux and probably getting over my head but got to start somewhere. with making a shell script to run on puppy linux to shred all drives connected to it. I have been able to successfully use the command to wipe all drives connected but cant figure out how to write a script for it. I have several hard drives i got and want to shred wipe them before using them..

View 7 Replies View Related

Ubuntu :: Show Time Elapsed/remained In 'shred' Terminal Command?

Jun 4, 2010

It is possible to not only have the progress of the shredding, but the time elapsed/remained/whatever as well? It would be great to be able to see the time elapsed/time remaining along with the percentage complete.

View 4 Replies View Related

General :: Expanding Globs In Xargs?

Jun 29, 2011

I have a directory like this:
mkdir test
cd test
touch file{0,1}.txt otherfile{0,1}.txt stuff{0,1}.txt

I want to run some command such as ls on certain types of files in the directory and have the * (glob) expand to all possibilities for the filename.

echo 'file otherfile' | tr ' ' '
' | xargs -I % ls %*.txt

This command does not expand the glob and tries to look for the literal 'file*.txt'

How do I write a similar command that expands the globs? (I want to use xargs so the command can be run in parallel)

View 1 Replies View Related

Programming :: Using AWK Within Bash Command Via Xargs

Mar 24, 2011

I often want to extract some info using awk from a variable/filename while running other things using xargs and sh. Below is an example:
Code: ls -1 *.txt | xargs -i sh -c 'NEW=`echo $0 | awk -F'_' '{print $1}'`; echo $NEW' {}

In the above case I would like to grab just the first field from a filename (delimited by '_') from within an sh command. This is a simplified example, where normally I would be doing some further data processing with the sh command(s).

The error message that I get is:
Code: }`; echo $NEW: -c: line 0: unexpected EOF while looking for matching ``'
}`; echo $NEW: -c: line 1: syntax error: unexpected end of file.
I haven't been able to figure out how to escape the awk command properly.

View 1 Replies View Related

General :: Copy Files Using Xargs From A Folder To Another?

Jun 10, 2009

I'm trying to copy a list of files except the files which has ".log" in the filename to another folder.I can run it correctly when I am located in the Source folder, but not when I am in any other location.cd /home/me/Sourcels /home/me/Source -1|grep -v "^.*log$" |xargs -n 1 -iHERE cp -r HERE /home/me/DestinationHow can I indicate both Source and Destination Folder?

View 2 Replies View Related

Fedora :: Using Xargs With Yum (Removing List Of Software)

Jan 23, 2010

I used the command shown below to remove a list of software using yum. It worked, but is there a way of doing this without using the -y option? I would like to review the results before the transaction takes place. I would like to use the same method for installing additional software after a clean install.
cat filename | xargs yum -y remove

View 8 Replies View Related

General :: Xargs CD Not Working (Echo Some Directory)

Mar 18, 2010

Please explain why
Code:
echo some_directory | xargs cd
is not working.
Code:
echo some_directory | xargs ls
is working as expected.

View 14 Replies View Related

General :: Xargs - Inserting Picture Into Group

Jun 17, 2011

I want to insert a picture into a group of pictures (I memorized their names in a text file) resulting a new group of picture (which I also memorized their name in another text file), but I have a problem doing that. I want to write something like that:

$> cat file1 | cat file2 | xargs composite -blend 30 text.jpg line_file1 line_file2
where
file1 is:
frame1.jpg
frame2.jpg
frame3.jpg
....

and file2 is:
new_frame1.jpg
new_frame2.jpg
new_frame3.jpg
...

View 4 Replies View Related

Programming :: Basename With Command Substitutions And Xargs

Jun 17, 2011

I get this behavior on Slackware 13.37, which includes BASH 4.1.010. Yes, BASH is my shell. I have a file called a.flac and I'm in the directory that contains it.

The output of the ls command is expected:
Code:
ls *.flac
gives:
Code:
a.flac

Removing the extension with basename works as expected:
Code:
basename a.flac .flac
gives:
Code:
a

Putting the above command in a variable substitution works as expected:
Code:
echo `basename a.flac .flac`
gives:
Code:
a

Using xargs with ls and a variable substitution works as expected:
Code:
ls *.flac | xargs -i echo `echo {}`
gives:
Code:
a.flac

However, when I try to add the basename command to the above command, it stops working.
Code:
ls *.flac | xargs -i echo `basename {} .flac`
gives:
Code:
a.flac

Whereas the result I expect is:
Code:
a
Why is it not working, and how do I make it work?

View 3 Replies View Related

General :: Xargs And Unzip All Files To Specific Directory?

Jun 22, 2009

I'm trying to find all zip files timestamped from the past 7 days, then unzip them into a different director.I tried the following, but it only unzipped one of three files that meet the 7 day criteria. What am I missing?Code:find /home/user/public_html/zip_files/ -iname "*.zip" -mtime -7 -print0 | xargs -n10 unzip -LL -o -d /home/user/public_html/another_directory/

View 1 Replies View Related

General :: Traverse The File System And Rename (xargs Or Sed)?

May 15, 2011

I need your inputs on performing some operations:-

a. Traverse from top Level directory, find all the directories

b. Rename all these directories to <original name>.dir

c. Once the renaming is done - search from top level and retain only those directories which has .txt content in them.

d. Delete rest all.....

Can i use xargs here to perform operation a and b , or will sed will be useful.

View 14 Replies View Related

General :: Xargs - How Some Command Receive Input From Both Sides

Mar 9, 2010

I would like to ask the following:
1) ls -l |grep test -> this will grep every "ls -l" output line
2) ls -1 |xargs grep test -> this will grep every single file with test
3) ls -1 |xargs echo -> this will echo directory list
4) ls -1 |echo -> this does nothing!!!

My question is: how some command can receive input from "both sides" (grep can grep whole output or every single file - xargs, the same is for i.e. wc command). 4) echo does nothing (it's a single echo command).

View 1 Replies View Related

Programming :: Using Sed With Variable Created Using Xargs / Unterminated Error

Jan 12, 2009

I have an awk program that finds all files of a specific filename and deletes them from selected subdirectories. There is logic in the awk to avoid certain subdirectories, and this is initialized via a parameter in the beginning statement of the awk. The parameter should have all of the subdirectory names at the top level. This varies from time to time, so I cannot hard-code the value.I'm having a problem initializing the awk parameter using sed. I'm setting a variable (named subdir) using an "ls" command piped to "xargs". I'm then trying to substitute that value into the awk using the sed command.

View 3 Replies View Related

Ubuntu :: Find Java Software Like Vuze / Jdownloader To Be Really Slow?

Oct 5, 2010

I have the following spec:
- Intel Core 2 Duo 1.86Ghz
- 4GB Ram
- 1TB Hard Disk
- 256MB Nvidia GeForce Graphics Card

I believe my system is quite fast, yet programs like JDownloader and Vuze (aka azureus) are very slow. More so on the GUI side, not so much program functionality (although I have not tested this either). If I scroll down a list of items, it takes ages, it lags and response time is quite bad.Also, I have two java processes running, each using 200MB of memory. I am assuming one is for Vuze and the other is for Jdownloader. It seems to me that Windows XP/Windows 7 ran java applications much faster and had less ram. I definitely see that with Vuze as it never went into the 200MB area when under windows.

View 4 Replies View Related

Ubuntu :: Slow Startup, Plymouth Not Showing, Slow Desktop Load?

May 3, 2010

I'm an Ubuntu user since Jaunty, and I've always upgraded my system (NOT fresh install). Everything went fine, but yesterday I upgraded to Lucid. My only concern -for now- deals with startup time. I'm a desktop user (Core2@3GHz) so I think I should boot in less than 10 seconds. Anyway, boot time is 30 seconds - not too much, but there is definetly something wrong with tools I don't know (ureadahead, plymouth, etc.). Attached is my bootchart: can anyone explain me what's wrong?

Also, I don't even see a plymouth Ubuntu themed bootsplash: I only see a blank (black) screen standing for seconds, then I see the bootsplash for less then half a second, then GDM appears :S Not crucial -I know- but how can I fix it? (I don't know if it's related, but I can see the animation at shutdown)Finally, GNOME desktop takes too long to load. I don't know why, but there are 15/30 seconds in between login sound and a usable desktop (with panels and icons, I mean).Please help me, I don't want to do a fresh install. Boot speed is not a dial with desktops - I know - but it can be a symptom that my system is a bit a messy (and I don't like it, since I installed Jaunty less then 1 year ago). (!Forgot! I also installed grub2 by hand

View 6 Replies View Related

Ubuntu :: How To Deal With My Slow Computer - Runs Desperately Slow ?

Jan 22, 2010

I just want to know how to easily speed up my computer because it runs desperately slow. I am running windows Xp which is about two years old.

View 9 Replies View Related

Ubuntu :: USB Disk - Slow Transfer Speeds And Slow System?

Apr 17, 2011

Whenever I transfer a movie into my 16GB USB flash disk, my whole system becomes windows-like and unusable!

When i drag the file(s) into the USB disk folder, it starts out fine and pretty darn fast (25mb/sec) then slowly decreases until it's unbearably slow (3m/sec) and as a side effect my whole system starts deteriorating. I basically have to wait for the file to finish transferring before i can use my desktop again!

This has been happening with every version since Karmic (all 64bit)- I put up with it because I don't use the USB stick that much.. but lately it's been my go to source for transfering large files to/from work.

View 3 Replies View Related

General :: Slow Very Slow File Download On Platform?

Jan 11, 2010

I have good experience in microsoft enviroment, now tiring to use linux, i tried Ubuntu 9.10, OpenSuse on different computers bur there is same big problem: Very slow download speed compared to microsoft.same file at same time downloaded by microsoft winxp toke incomparable short time. for example file 5.5MB attached to e-mail on Yahoo toke ~1minute to download on winxp computer,same file at same computer but with Ubuntu takes more thane 30minutes!

View 3 Replies View Related

Ubuntu Networking :: Wifi Is Fast Then Slow Then Fast Then Slow Connect Disconnect ?

May 7, 2010

My wireless seems to be fast for a good 30secs then bang takes good while to load the next page almost as if it's disconnecting and then reconnecting/scanning reconnecting. Why cant it stay connected. I have WAP PSK security here is my network setting please let me know if I should change any of them:(side not is there a way to fix this problem occuring so frequently it says on the wiki that it should only occur once in a whilce https:[url].....

View 2 Replies View Related

General :: Find Mechanism With Irregular Expression (find Command) Or Perl?

Sep 7, 2010

I have 4 Linux machines with cluster.My target is to find all kind of IP address (xxx.xxx.xxx.xxx) in every file in the linux system remark: need to scan each file in the linux system and verify if the file include IP address if yes need to print the IP as the following

more /etc/inet/file.example1

182.23.2.4
255.255.0.0
10.10.1.1

View 1 Replies View Related

General :: Find/grep/wc Command To Find Matching Files - Print Filename And Word Count?

Sep 11, 2009

I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:

wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;

View 10 Replies View Related

General :: Command Line - Use Find To Find Text Files?

Jul 15, 2011

Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.

View 2 Replies View Related







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