Sponsored Content
Top Forums Shell Programming and Scripting How to copy specific files when you don't know the file name? Post 302479413 by Scrutinizer on Friday 10th of December 2010 02:52:21 PM
Old 12-10-2010
See if this works:
Code:
(set -- *; cp -p "$2" "$3" /path/to/newdir)

 

10 More Discussions You Might Find Interesting

1. Solaris

To copy the files newer than specific date

Dear all, Can you help me in copying files newer than speciifc date Thanks in advance, Rajesh (3 Replies)
Discussion started by: RAJESHKANNA
3 Replies

2. Shell Programming and Scripting

Recursively copy only specific files from a directory tree

Hi I am a shell-script newbie and am looking to synchronize certain files in two directory structures. Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over. I want only .sh and .pl files in each subdirectory under these directory trees to be... (3 Replies)
Discussion started by: sharpsharkrocks
3 Replies

3. Shell Programming and Scripting

Bash copy file contents into an existing file at a specific location

Hi all I need to copy the entire contents of one file into an existing file at a specific location. I know the exact line number where I need to put it. It appears I would use either sed or awk to do this, but I have been unsuccessful so far: File A line 1 line 2 line 3 line 4 ... (6 Replies)
Discussion started by: gshepherd7
6 Replies

4. Shell Programming and Scripting

How to copy specific file.txt in specific folder?

hye there... i have a problem to copy file in specific folder that will change the name according to host,time(%m%s) and date(%Y%M%D) example folder name: host_20100531.154101801 this folder name will always change... but i just want to copy the AAA.txt and BBB.txt file.. really need... (17 Replies)
Discussion started by: annetote
17 Replies

5. Shell Programming and Scripting

copy specific files and count them - not as easy as it seems!

Hi all: Here's my dilemma: to identify files of a specific type, copy them to a new location while preserving the original file attributes (date, time, full path, etc), and at the same time capture the count of the number of files identified as a variable for later reporting. Here's where I... (9 Replies)
Discussion started by: Yamaha Evans
9 Replies

6. Shell Programming and Scripting

How to copy a directory without specific files?

Hi I need to copy a huge directory with thousands of files onto another directory but without *.WMV files (and without *.wmv - perhaps we need to use *.). Pls advise how can I do that. Thanks (17 Replies)
Discussion started by: reddyr
17 Replies

7. Shell Programming and Scripting

Copy specific file (different but same name) as folder name

I have to copy a particular file present in a main folder having part of the file-name present in many sub-folders to a new destination preserving the name of the source "part of the main folder" and previous file-name of the output file: Example: From /005_0/1000/005.xxx ->... (7 Replies)
Discussion started by: wappor
7 Replies

8. Shell Programming and Scripting

Rsync to copy specific subfolders and files to new directory

RootFolderI: RootFolderI/FolderA/Subfolder1/Subsub1/JPG1.jpg -> want this jpg RootFolderI/FolderA/Subfolder2/Subsub1/JPG2.jpg -> want this jpg RootFolderI/FolderA/Subfolder2/Subsub2/JPG3.jpg . . . RootFolderI/FolderB/Subfolder1/Subsub1/JPG4.jpg -> want this jpg ... (1 Reply)
Discussion started by: blocnt
1 Replies

9. Shell Programming and Scripting

Copy files based on specific word in a file name & its extension and putting it in required location

Hello All, Since i'm relatively new in shell script need your guidance. I'm copying files manually based on a specific word in a file name and its extension and then moving it into some destination folder. so if filename contains hyr word and it has .md and .db extension; it will move to TUM/HYR... (13 Replies)
Discussion started by: prajaktaraut
13 Replies

10. Shell Programming and Scripting

Copy Specific Files Recursively

Is it possible to only copy selected files+its directories when you are copying recursively? find /OriginalFolder/* -type -d \{ -mtime 1 -o -mtime 2 \ } -exec cp -R {} /CopyTo/'hostname'__CopyTo/ \; -print From the above line, I want to only copy *txt and *ini files from /OriginalFolder/* ... (4 Replies)
Discussion started by: apacheLinux
4 Replies
EVENTCOUNTER(1) 					      General Commands Manual						   EVENTCOUNTER(1)

NAME
eventcounter, eventgenerator, eventlogger, eventselect, eventsink, eventsource, viewevents - utility applications which can be used together with other MUSIC-aware applications in multi-simulations SYNOPSIS
eventcounter [-tbmh ] n_units prefix [ suffix ] eventgenerator [-tbfmih ] n_units eventlogger [-tlbmih ] eventselect [-th ] n_units units eventsink [-tmih ] n_units prefix [ suffix ] eventsource [-tbmih ] n_units prefix [ suffix ] viewevents [-tshT ] configfile DESCRIPTION
This manual page documents briefly a set of MUSIC-aware utility applications provided together with MUSIC library. eventcounter receives spikes through a MUSIC input port, counts all spikes for each index and writes the frequencies to a set of files with names prefix rank suffix eventgenerator generates spikes from a Poisson distribution. eventlogger logs spikes from a MUSIC port. eventselect receives events from an input port of width n_units and sends events for the subset of id:s specified in the file units eventsink receives spikes through a MUSIC input port and writes these to a set of files with names prefix rank suffix eventsource reads spikes from a set of files with names prefix rank suffix and propagates these spikes through a MUSIC output port. viewevents reads spikes from a MUSIC input port and displays them as a 3D graphical representation. OPTIONS
The utilities follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. -b ticks, --maxbuffered ticks Specify maximal amount of data buffered. -f freq, --frequency Specify average frequency (default 10 Hz). -h, --help Show usage information. -i, --indextype Select global (default) or local indices. (Used for testing and benchmarking purposes.) -l latency, --acclatency latency Specify acceptable data latency (s). -m type, --imaptype type Select linear (default) or roundrobin index map. -s scaling, --scaletime scaling Specify real time to simulated time scale factor (s). If omitted, the visualization runs at full speed. -t timestep, --timestep timestep Specify time between tick() calls (default 0.01 s). -T title, --title title Specify window title. SEE ALSO
music(1) AUTHOR
MUSIC was written by Mikael Djurfeldt and Orjan Ekeberg for INCF. viewevents was written by Johannes Hjorth for INCF. This manual page was written by Mikael Djurfeldt <mdj@debian.org>, for the Debian project (but may be used by others). March 5, 2009 EVENTCOUNTER(1)
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy