General :: Generate Random List And Determine Size Of Arbitrary Block Of Files In Dir?

Mar 4, 2010

I want to generate a temporary random list from a directory of files and then determine the size of an arbitrary block of files from this list (say 1-25 or 26-50) and add their names to a file along with some other info for each name. I can generate a random list with file sizes like this: ls -l | sort -R | cut -d " " -f 6 but i'm not sure how to add up the sizes of just a certain block of these files and at the same time save the file names.

View 2 Replies


ADVERTISEMENT

General :: CLI Commands To Generate Random Result From Specified List?

Jul 20, 2011

List of 77 lines with the names of movies. For ease, let's say it's in a text file. What I want is a command line argument I can pass that'll read each line and pick one of those 77 lines at random, except I can't figure out how to do this. Is there a program I can just pipe the output of 'cat listofmovies.txt' to?

View 13 Replies View Related

Ubuntu :: Generate A List With Files And Folders?

Feb 2, 2011

if there is an application available to generate a list with files and folders from a location, like a hard drive or a folder? The list could be in any format, even a text file would be just fine.

View 3 Replies View Related

General :: Generate Random Number Either 1 Or 0?

Jan 21, 2010

Not only that but I need tons and tons of them generated, and I need it to be totally random each time.

Code:
matthew@mvm:/h/misc> cat a
#!/bin/bash
for i in {1..5}; do
echo $RANDOM

[Code]....

There you can see that it is the same number. It does that every time!! Grrr. The strange thing is each time I manually type [or copy & paste] it into the terminal, it gives random [not static, like I am getting from my script] results.

The reason I want this is because I am making a script where this line will randomly go up or down [depending on if the random number is 1 or 0].

View 4 Replies View Related

General :: Generate List Of All Available Man Pages On System?

Nov 5, 2010

How to generate a list of all available man pages on a system?

View 4 Replies View Related

General :: Determine Mp3 Length By File Size?

Nov 16, 2010

Multiple dirs full of mp3s All strictly encoded with exactly the same parameters (CBR 128kbps, Joint-Stereo, etc) Is it possible to determine the total playing time (to within ~98% accuracy) by some formula based on the total file size? I say ~98% accurate since ID3 tags do consume a small amount of space.

View 3 Replies View Related

General :: Determine The Size Of Each File In A Folder?

Nov 30, 2010

i have a folder with 10 files and i would like to determine the size of each file. i was trying the command

Code:

du -sh foldername

but i receive the total size .

View 5 Replies View Related

General :: List Folder Size And Number Of Files And Folders In Folder?

Nov 23, 2010

In Linux bash shell, for a given directory, how can I list:The create date for that directory The number of files in that directory The number of subdirectories in that directory.

View 3 Replies View Related

Software :: Generate Random Letters Only?

Aug 24, 2010

I have this: Code: dd if=/dev/urandom count=128 bs=1 2>&1 | md5 | cut -b-10 But I only want it to have letters and no numbers. What can I do for this?

View 13 Replies View Related

Programming :: Using /dev/random To Generate Double?

Mar 6, 2010

I need to generate random numbers using /dev/random in C. The numbers should be of type double (64-bit floating point).The functionality should be equal to linux command "od -An -N8 -t fD /dev/random", but written in C.The prototype should be "double drand(void);".

View 7 Replies View Related

Programming :: Script To Generate Random Dates?

Aug 3, 2010

A script to generate random dates. It uses the year range 2006-2009, and truncates every month of the year to an ordinary February's 28 days, but otherwise it's pretty solid and safe.

Code:
spate=1
while [ $spate -le 120 ]

[code]....

View 1 Replies View Related

Ubuntu :: Dispaly All Files List Morethan 20 Mb Size In Terminal?

Jul 1, 2010

I want to know how to get the details of all files in my system more than 20mb or some specific amount of file size in Ubuntu terminal by using commands.

View 1 Replies View Related

Security :: Script To Monitor Sizes Of List Of Files And Send Alert If Size Changes?

Mar 28, 2011

I am looking for a utility that would do the following:1. Be run manually on a list of files whose sizes should not change, to get a control file containing the sizes of each file.2. Subsequent manual runs would report any changes in size of any of the files in the list, and allow option to accept the new sizes.3. Be run as a cron job to check for changes in the file sizes and send an email alert if a change has occurred since the last time it was run.The purpose is to detect possible hacks of key files on a website. It would not include files expected to change, but just those that should not change. It would be run manually a few times to get the control list one wants to monitor.

View 3 Replies View Related

General :: Dd Block Input/output Size?

Mar 8, 2010

I'm trying trying to understand dd, and I'd like to know why frequently do we have to use a block read/write size, like "dd bs=1024", "dd ibs=512"... If it executes the operation byte by byte, isn't it irrelevant? What is this block size then?

View 6 Replies View Related

General :: Block Size For Disk Cloning With Diskdump (dd)?

Jan 17, 2011

I use dd in its simplest form to clone a hard drive dd if=INPUT of=OUTPUT However, I read in the manpage that dd knows a blocksize parameter. I was wondering whether there is an optimal value for the blocksize parameter that will speed up the cloning procedure?

View 4 Replies View Related

General :: Cannot Mount Ext4 Fs With Block Size Of 65536

Feb 5, 2011

I am doing some benchmarking on EXT4 performance on Compact Flash media. I have created an ext4 fs with block size of 65536. however I cannot mount it on ubuntu-10.10-netbook-i386. (it is already mounting ext4 fs with 4096 bytes of block sizes) According to my readings on ext4 it should allow such big block sized fs. I want to hear your comments.

[Code]...

View 2 Replies View Related

General :: Block Size Explanation In Plain English?

Apr 8, 2011

what block size means in plain English? I know block size 4k has 2 TB of file size limit and 1024 has around 17 GB. How do they calculate this?

View 3 Replies View Related

General :: Mount An NTFS Drive Which Has A Different Block Size?

Mar 31, 2010

I have reformatted my hard drive with allocation size 64K(formatted on windows with 64k setting) for a better performance on my WDTV HD media player(dealing with large files).When I mount this drive on Linux, the properties tells me that"blksize=4096".If I keep writing files using this default setting(blksize=4096) to my NTFS formatted hard drive, will my WDTV be able to benefit from the performance improvement of 64k allocation size ?I am confused, Does it have anything to do with "blksize=4096". ?Should I try and mount my hard drive with a larger blksize ?I did some research on google but couldn't find an option to increase the blksize when mounting an NTFS pre-formatted drive

View 1 Replies View Related

General :: How To Generate Report - Sa* And Sar* Files ?

May 29, 2011

I have collected the sa* and sar* files for the past two weeks , i need to generate the report for these files how can i do so i am using centos 5.5. assist me with a tool or a command to do the same.

View 6 Replies View Related

Ubuntu :: BASH Script - How To Stop Loading Files At Arbitrary Number

Aug 9, 2010

I have the following code in bash script:
Code:
#!/bin/bash
COUNT=1
# bash until loop
until [$COUNT -gt 2]; do
pq A$COUNT [Pemptus].pq &
let COUNT=COUNT+1
done

I did this because I'm that much of a Progress Quest geek that I wanted to have a huge group on the online server, so I decided to make a script that would open all the files for me rather than having me do it manually. I created some characters with the boring name of A1, A2, etc. When I ran the above script, it went into a continuous loop and I had to halt it, then run sudo killall pq.exe to eliminate the 500 or so Progress Quest windows that popped open. Anyway, what is wrong with my script that I can't seem to get it to stop loading files at an arbitrary number? I want to get this part finished before I make any more boring named characters.

View 1 Replies View Related

General :: Cannot Mount Hard Disk: Block Count Exceeds Size Of Device

May 11, 2011

I have one hard disk (call her HDA) that contains nothing but a single ext4 partition containing a backup of all my important data. Last night I did a clean install of Ubuntu 10.10 on my primary hard disk (call her HDB) and from there proceeded to upgrade directly to Ubuntu 11.04 upgrade. In 10.10, I was able to read HDA just fine. However after the upgrade, I can no longer mount this drive. When mounting from file browser:

Code:

Error mounting: mount: wrong fs type, bad option, bad superblock on /dev/sda,missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so The end of dmesg said the following:

Code:

dmesg | tail
[ 82.130904] EXT4-fs (sda): bad geometry: block count 122096646 exceeds size of device (122096381 blocks)

my hard disk has a block count greater than the size of my device. I've done my background searching on this and tried a command line utility I've never heard of before:

Code:

# sudo e2fsck /dev/sda
e2fsck 1.41.14 (22-Dec-2010)
The filesystem size (according to the superblock) is 122096646 blocks
The physical size of the device is 122096381 blocks

[code]....

this is as far as I've gotten. This drive holds over a decade's worth of work for me and is extremely valuable. I really didn't think that the Ubuntu upgrade process would mess with this drive, seeing as the Ubuntu install was contained on an entirely different drive. What is it that I need to do to restore my drive to working status?

View 9 Replies View Related

Networking :: Determine A Mtu Size For A Nic?

Jan 8, 2010

i want to change the mtu size of my ethernet controller. I have done successfully set the mtu size 9000 for broadcom net xtreme PCI: 66 Mhz 64 bit 1 gigabit card. (fibre)

Part model no: BCM95703A31
[root@lux08 ~]# ethtool eth0Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes

[Code]....

how to change the mtu size for this NIC?

View 15 Replies View Related

Debian :: Generate Directory List With Exclusions?

Aug 18, 2011

I'm trying to generate a list of my music directory folder structure WITHOUT the files included. I have my music directory set up in a hierarchy of Artist>Album>Files, and I just want to generate a list of the folders because that will, in effect, output a list of what albums I have by what artists, which is ultimately what I'm after. I did some looking on the internet through various forums over the past few days and found two ideas that looked promising, but ended up being not exactly what I needed. The first was to generate a .txt file based off of a shell ls command:

ls -R [music directory name] >> ~/mymusiclist.txt

That's great, except that it also includes the 40,000+ individual music files by name. I'm not about to invest that much time editing the files out of the list when I know there has to be an easier way.The second idea I came upon involved using the extglob function. I tried enabling extglob and using it to input a "negative wildcard" into the above method to remove anything .mp3 from the returned list, but extglob didn't play well in that context. I'm not a command line wizard, so it's entirely possible that I'm missing something fairly obvious. In fact, I'm sure I am. So this is a great opportunity for me to learn something new. If anybody knows of a command line way to do this, I'd love to know it. Or, even better, if anybody knows of an app that can do this, even better. I'm not above installing a secondary music player just to import the library once and get my list.

View 3 Replies View Related

Programming :: Determine The Size Of File In A Script?

Jun 24, 2010

I have the following which works but think there must be a easier one-liner way of doing this which involves not writing to a file but have failed to find something that works This is what I have:

Code:

du -m $i > filesize.txt
FILESIZE=$`cat "filesize.txt" | cut -f1
rm filesize.txt

I then use the FILESIZE to compare to a number.

View 3 Replies View Related

General :: Determine What Files Are Being Accessed By A Process

Mar 23, 2010

How would I find out all the files a particular process accesses?

I am using Ubuntu 9.04.

View 1 Replies View Related

Debian :: Sources.list - To Determine US Or UK?

Mar 7, 2011

I have created a custom debian netinst USB stick. It has the default UK repositories in the sources list, but people in the US also need to use the stick from time-to-time.

Would it be a bad idea to mix US and UK repositories in the sources.list? Would Debian be clever enough to pick up the best repo depending on where the user is using the OS from? Or would I need to be a bit clever and create some sort of script to deal with this. (I am avoiding non-free/experimental software).

View 2 Replies View Related

Ubuntu Multimedia :: K3B: Could Not Determine Size Of Resulting Image File

Mar 7, 2010

When I try to burn some .flv files onto a DVD iso using K3B, it gives me the message: "Could not determine size of resulting image file"

View 1 Replies View Related

Programming :: Reading Lines To An Array And Generate Dynamic Zenity List?

May 18, 2011

explanation what I want to do exactly:I have a textfile which looks for instance like this:

file.txt:
...
something=else to do

[code]....

View 14 Replies View Related

Ubuntu Installation :: E: Internal Error: Couldn't Generate List Of Packages To Download

Nov 16, 2010

My problem is that I am unable to do a routine upgrade of packages. When I try to perform an upgrade, the following occurs:

Code:

$ sudo aptitude dist-upgrade
Reading package lists... Done
Building dependency tree

[code]....

If I try to install another package, I get the following message:

Code:

E: I wasn't able to locate file for the tzdata-java package. This might mean you need to manually fix this package.
E: I wasn't able to locate file for the tzdata-java package. This might mean you need to manually fix this package.
E: Internal error: couldn't generate list of packages to download

View 9 Replies View Related

CentOS 5 Hardware :: Determine IO Size During Reads And Writes To A Storage Device

Nov 19, 2009

Is there a way to determine the IO size that is being used for reads and writes to an attached storage device? I am trying to pattern the IO sequences to storage. I have seen mentions to max_sectors_kb but the notes indicated that changing this value did not change the IO size to the storage.

View 1 Replies View Related







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