Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [Question]How to copy files to all subdirectory Post 302212985 by dzufauzan on Wednesday 9th of July 2008 01:45:33 AM
Old 07-09-2008
Quote:
Originally Posted by zaxxon
Something like:
Code:
for ELE in `find . -type d -print| awk 'NR > 1 {print}'`; do cp php.ini ${ELE}; done

Thx alot
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can I copy files and subdirectory?

I am trying to copy some files from one location to another and I need to write a script to move all the files and the subdirectories to the new location (both unix), but excluding the temp directory. i.e., I want to avoid copying my temp subdirectories during the process of copying other files... (3 Replies)
Discussion started by: odogbolu98
3 Replies

2. Shell Programming and Scripting

Count files in every subdirectory

Hi if anyone could help me :) I did a lot of search and 70% of answer is "how to count files in all subdirectories". A basic problem for me is how to count files in every subdirectory separately then sort it by number of files For example: dir1 file1 file2 subdir11 dir2 dir3 ... (3 Replies)
Discussion started by: yorryk
3 Replies

3. Shell Programming and Scripting

How to deleting some files under subdirectory

Hi guys, sorry if my english not very well.. i have a problem.. i have a file and the structure is : Folder/ Folder/10.123.124.20/pm_data/A200807 Folder/10.123.124.20/pm_data/A200807 Folder/10.123.124.20/pm_data/A200807 Folder/10.123.124.20/pm_data/A200808... (4 Replies)
Discussion started by: AdziE
4 Replies

4. Shell Programming and Scripting

(yet another) copy files from windows to server question

Hi all, I spent the last few hours Googling for a solution without result, so here goes: I have Windows server 'source' that produces files that need to be copied to an external Linux server 'target'. I initiate this process from AIX server 'jobrunner'. An additional step is a Linux server... (2 Replies)
Discussion started by: whbos
2 Replies

5. UNIX for Dummies Questions & Answers

How to move all files in a directory and subdirectory?

I'm trying to organize my MB Pro by moving all my jpeg files to a single folder from the desktop. There are some on the desktop that are not in any folder. I was at the command line and typed mv *.jpg "Jpeg files" but it only moved the files that were on the desktop, not any of the ones that... (3 Replies)
Discussion started by: Straitsfan
3 Replies

6. UNIX for Dummies Questions & Answers

Listing files in subdirectory

Forgive me if there is an answer to this somewhere in the forums. I've gone through as much as I could but couldn't find a relevant answer. What I'm trying to do is use the ll command to list some files in a subdirectory that matches a certain format. I've tried ll *.*a* <subdirectory> but... (3 Replies)
Discussion started by: archaic
3 Replies

7. UNIX for Dummies Questions & Answers

How to Find files in subdirectory?

I am trying to find all DAT files in a subdirectory named IN. I do not know the entire path. For example: /stage/<?>/<?>/IN/file.DAT I am using the find command without success: find /stage -name IN -a -name '*.DAT' -print What is the correct logic and syntax? Thank you for the help. (5 Replies)
Discussion started by: TwinGT
5 Replies

8. Shell Programming and Scripting

Copying Multiple Files into a Subdirectory

Hello, I'm very new to scripting languages and I'm to use shell script to write a utility to backup files with a specific extension into a subdirectory. Here is what I have done. #!/bin/bash read -p "Enter file(s) extension: " FILE if ; then mkdir `whoami`.$FILE #To... (9 Replies)
Discussion started by: alphanoob
9 Replies

9. UNIX for Dummies Questions & Answers

Copy non-empty files into subdirectory

How to Copy non-empty files into subdirectory I have directory A there are bunch of files: a.txt a.txt.target b.txt b.target.txt....... How can i find out the non-empty file within *.txt.target and copy them into a subdirectory B? Thank you. (2 Replies)
Discussion started by: grace_shen
2 Replies

10. UNIX for Dummies Questions & Answers

NFS question when you have a subdirectory that you don't want to be shared?

I have a somewhat interesting problem, we've decided to load balance a java application and as such I'll be running our application on four physical machines as opposed to the single machine it's currently running on. I've centralized the directory that the application requires (including the... (2 Replies)
Discussion started by: xdawg
2 Replies
MTOOLS(1)						      General Commands Manual							 MTOOLS(1)

NAME
Mtools - a collection of tools for manipulating MSDOS files SYNOPSIS
mattrib - change MSDOS file attribute flags mcd - change MSDOS directory mcopy - copy MSDOS files to/from Unix mdel - delete an MSDOS file mdir - display an MSDOS directory mformat - add an MSDOS filesystem to a low-level formatted diskette mlabel - make an MSDOS volume label mmd - make an MSDOS subdirectory mrd - remove an MSDOS subdirectory mread - low level read (copy) an MSDOS file to Unix mren - rename an existing MSDOS file mtype - display contents of an MSDOS file mwrite - low level write (copy) a Unix file to MSDOS DESCRIPTION
Mtools is a public domain collection of programs to allow Unix systems to read, write, and manipulate files on an MSDOS filesystem (typi- cally a diskette). Each program attempts to emulate the MSDOS equivalent command as closely as practical. MSDOS filenames are optionally composed of a drive letter followed by a colon, a subdirectory, and a filename. Subdirectory names can use either the '/' or '' separator. The use of the '' separator or wildcards will require the names to be enclosed in quotes to protect them from the shell. The regular expression "pattern matching" routines follow the Unix-style rules. For example, '*' matches all MSDOS files in lieu of '*.*'. The archive, hidden, read-only and system attribute bits are ignored during pattern matching. All options use the '-' (minus) flag, not '/' as you'd expect in MSDOS. The mcd command is used to establish the device and the current working directory (relative to the MSDOS filesystem), otherwise the default is assumed to be A:/. SEE ALSO
mattrib(1), mcd(1), mdel(1), mformat(1), mrd(1), mren(1), mtype(1), mcopy(1), mdir(1), mlabel(1), mmd(1), mread(1), mwrite(1) BUGS
An unfortunate side effect of not guessing the proper device (when multiple disk capacities are supported) is an occasional error message from the device driver. These can be safely ignored. local MTOOLS(1)
All times are GMT -4. The time now is 07:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy