Sponsored Content
Full Discussion: move first 1000 files
Top Forums Shell Programming and Scripting move first 1000 files Post 302445948 by timgolding on Tuesday 17th of August 2010 08:35:29 AM
Old 08-17-2010
move first 1000 files

Hi i have a folder with 27,000 images. I need to process each image using imagemagick. I have got image magick working. I don't want to attempt to process all 27,000 images in one go and thought i would try doing it with 1000 images at a time. Is there some way i can list only the first 1000 entries and move them to a new folder for processing

Code:
cd /folder
for i in `ls -1`
do
    mv $i  ../temp/$i
done

That sort of thing but only do 1000
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating 1000 files using a script

I would like to write a script that would create 1000 files like clm0001.txt to clm1000.txt. All the files would contain the same contents. How do I achieve this using a script?Please help. (2 Replies)
Discussion started by: ggayathri
2 Replies

2. UNIX for Dummies Questions & Answers

Move same files and issue ls -al command on remaining files

I know I can use an ls -l junk1 command to get a listing of all files in the directory junk1, but I was wondering how I'd go about going through the files in junk1 in a for-in loop and issuing the ls -l command on them one by one. This is what I have so far: for file in $(ls -a $1) do ls... (1 Reply)
Discussion started by: Trinimini
1 Replies

3. Shell Programming and Scripting

Script to find the string contain in which file 1000 files.

Hi Greetings i have 1000 files (xmlfiles) and i need to find which file contain the string over 1000 file all file end with txt i tried with grep -c "string" *.txt i am getting an error -bash: /bin/egrep: Argument list too long i have put an script like below #!/bin/bash for line... (9 Replies)
Discussion started by: venikathir
9 Replies

4. Shell Programming and Scripting

Adding a line to 1000's of files right after x amt of characters.

I am trying to add a single line of text to every file in a particular folder. There are thousands of files in the folder. Each file contains this same start of the first line: {d "%w- %d %m-, %Y - %T"} <some message here> with the rest of the text following the second curly bracket... (10 Replies)
Discussion started by: dlundwall
10 Replies

5. Shell Programming and Scripting

How do you check for a particular string in 1000's of files?

Please forgive my ignorance on scripting. I am trying to determine (via a script) if a certain string of characters is present . The string that I am looking for is a constant length. Here is the string I am searching for: Model_Type={t}, ModelName={m} I need to determine if the above... (2 Replies)
Discussion started by: dlundwall
2 Replies

6. Shell Programming and Scripting

Move all files except sys date (today) files in Solaris 10

I want to move all files from one directory to another directory excluding today (sysdate files) on daily basis. file name is in pattern file_2013031801, file_2013031802 etc (2 Replies)
Discussion started by: khattak
2 Replies

7. UNIX for Dummies Questions & Answers

Remove files from tar archive which are more than 1000 days old.

I am not able to extract/remove files older than 1000 days from a tar archive in linux system. #!/usr/bin/perl @file_list = `find /home/x/tmp/ -name *xxMsg* -ctime +7`; $file_name = '/home/x/tmp/new_archive.tar'; for... (1 Reply)
Discussion started by: DannyV
1 Replies

8. UNIX for Dummies Questions & Answers

Split files into smaller ones with 1000 hierarchies in a single file.

input file: AD,00,--,---,---,---,---,---,---,--,--,--- AM,000,---,---,---,---,---,--- AR, ,---,--,---,--- AA,---,---,---,--- AT,--- AU,---,---,--- AS,---,--- AP,---,---,--- AI,--- AD,00,---,---,---, ,---,---,---,---,---,--- AM,000,---,---,--- AR,... (6 Replies)
Discussion started by: kcdg859
6 Replies

9. Shell Programming and Scripting

Creating a sequence of numbers in a line for 1000 files

Hi, I try to explain my problem , I have a file like this: aasdsaffsc23 scdsfsddvf46567 mionome0001.pdb asdsdvcxvds dsfdvcvc2324w What I need to do is to create 1000 files in which myname line listing a sequence of numbers from 0001 to 1000. So I want to have : nomefile0001.txt that must... (10 Replies)
Discussion started by: danyz84
10 Replies

10. Shell Programming and Scripting

SBATCH trinity for multiple files and rename/move the output files

Hey guys, I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output) #!/bin/bash -l #SBATCH -p node #SBATCH -A <projectID> #SBATCH -n 16 #SBATCH -t 7-00:00:00 #SBATCH --mem=128GB #SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies
DRACUT-CATIMAGES(8)						      dracut						       DRACUT-CATIMAGES(8)

NAME
dracut-catimages - creates initial ramdisk image by concatenating images SYNOPSIS
dracut-catimages [OPTION...] <initramfs base image> [<image>...] DESCRIPTION
dracut-catimages creates an initial ramdisk image by concatenating several images from the command line and /boot/dracut/*.img OPTIONS
-f, --force overwrite existing initramfs file. -i, --imagedir Directory with additional images to add (default: /boot/dracut/) -o, --overlaydir Overlay directory, which contains additional files that will be used to create an additional image --nooverlay Do not use the overlay directory --noimagedir Do not use the additional image directory -h, --help display help text and exit. --debug output debug information of the build process -v, --verbose verbose output during the build process FILES
/boot/dracut/*.img images to work with AUTHORS
Harald Hoyer AVAILABILITY
The dracut-catimages command is part of the dracut package and is available from https://dracut.wiki.kernel.org SEE ALSO
dracut(8) dracut 09/12/2013 DRACUT-CATIMAGES(8)
All times are GMT -4. The time now is 07:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy