Sponsored Content
Full Discussion: Moving Files
Top Forums Shell Programming and Scripting Moving Files Post 302112422 by bigearsbilly on Wednesday 28th of March 2007 04:13:19 AM
Old 03-28-2007
Quote:
The beauty of a Unix system is the ability to create new commands from existing tools. If there isn't a command that does exactly what you want, write one.
aah, but there is!
cpio

Code:
cd   /iAm4Free/test
find . | cpio -pd ../test1

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

moving only files...

hi.. I want to move a set of files that contain a particular string. I wished to do that with find but i am unable to do that. can anybody give me a good method? :) (12 Replies)
Discussion started by: sskb
12 Replies

2. UNIX for Dummies Questions & Answers

moving files ??

I am using AIX Version 5.1 If I moved a file say using this command but the directory rpt did not exist would this dump the file? I went back to the directory I was moving it from and the file was gone and when I looked in the directory I moved it to of course that directory was not found.... (9 Replies)
Discussion started by: rocker40
9 Replies

3. Shell Programming and Scripting

Moving files

I wrote a script which moves files on first in first out basis. for i in `ls -ltr | grep ^- | head -10 | awk '{print $9}'` do mv $i Test/ done But donno some reason, this is not working on my Linux box. May i know the reason? Can the above script be done by using positional... (2 Replies)
Discussion started by: venkatesht
2 Replies

4. UNIX for Dummies Questions & Answers

Moving files

Hi I need to be able to move files from one central locations to different servers on our network. So i want all of our operators to place files to one area on the main storage area. From there i need a script that first checks the file is stable (finished copying) then copy to another server,... (5 Replies)
Discussion started by: treds
5 Replies

5. Shell Programming and Scripting

moving the files in a.txt files to a different directory

HI All, I am coding a shell script which will pick all the .csv files in a particular directoryand write it in to a .txt file, this .txt file i will use as a source in datastage for processing. now after the processing is done I have to move and archive all the files in the .txt file to a... (5 Replies)
Discussion started by: subhasri_2020
5 Replies

6. UNIX for Dummies Questions & Answers

Moving Multiple files to destination files

I am running a code like this foreach list ($tmp) mv *_${list}.txt ${chart}_${list}.txt #mv: when moving multiple files, last argument must be a directory mv *_${list}.doc ${chart}_${list}.doc #mv: when moving multiple files, last argument must be a... (3 Replies)
Discussion started by: animesharma
3 Replies

7. Shell Programming and Scripting

Finding files with wc -l results = 1 then moving the files to another folder

Hi guys can you please help me with a script to find files with one row/1 line of content then move the file to another directory my script below runs but nothing happens to the files....Alternatively Ca I get a script to find the *.csv files with "wc -1" results = 1 then create a list of those... (5 Replies)
Discussion started by: Dj Moi
5 Replies

8. UNIX for Dummies Questions & Answers

Moving files..

Selected directories on our system generate alerts when they exceed 60% of the disk space so I have used gzip to make the files smaller on one of the directories in question (AdminServer logs). I want to move these to another directory what is the best way to make this happen? Thanks.. (4 Replies)
Discussion started by: nosuchluck
4 Replies

9. UNIX for Dummies Questions & Answers

Moving Files to VM

Hi guys, i need to test a script on my RedHat which it's mounted on a VirtualBox (oracle VM). So i need to copy a directory with subdirectories, from a remote host to my VM. I'd like to do that within cmd not with program like Filezilla or something like that. Any idea please? (4 Replies)
Discussion started by: Newer
4 Replies

10. AIX

Moving Hidden files to normal files

I have a bunch of hidden files in a directory in AIX. I would like to move these hidden files as regular files to another directory. Say i have the following files in directory /x .test~1234~567 .report~5678~123 .find~9876~576 i would like to move them to directory /y as test~1234~567... (10 Replies)
Discussion started by: umesh.narain
10 Replies
cpio(4) 						     Kernel Interfaces Manual							   cpio(4)

NAME
cpio - Format of cpio archive DESCRIPTION
The header structure, when the -c option of cpio(1) is not used, is: struct { short h_magic, h_dev; ushort h_ino, h_mode, h_uid, h_gid; short h_nlink, h_rdev h_mtime[2], h_namesize, h_filesize[2]' char h_name[h_namesize rounded to word]; } Hdr; When the -c option is used, the header information is described by: sscanf(Chdr,"%6o%6o%6o%6o%6o%6o%6o%6o%11lo%6o%11lo%s", &Hdr.h_magic, &Hdr.h_dev, &Hdr.h_ino, &Hdr.h_mode, &Hdr.h_uid, &Hdr.h_gid, &Hdr.h_nlink, &Hdr.h_rdev, &Longtime, &Hdr.h_namesize,&Longfile,Hdr.h_name); The Longtime and Longfile are equivalent to Hdr.h_mtime and Hdr.h_filesize, respec- tively. The contents of each file are recorded in an element of the array of varying length structures, archive, together with other items describing the file. Every instance of h_magic contains the constant 070707 (octal). The items h_dev through h_mtime have meanings explained in stat(2). The length of the null-terminated path name h_name, including the null byte, is given by h_namesize. The last record of the archive always contains the name TRAILER!!! Special files, directories, and the trailer are recorded with h_file- size equal to zero. RELATED INFORMATION
cpio(1), find(1), stat(2) delim off cpio(4)
All times are GMT -4. The time now is 12:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy