I must write any shell script.
I want find files which have .txt extension and then copy them to other, whithout this extension, for example:
I found linux.out.txt file, and now it must be copy to new, linux.out.
So: linux.out.txt -> linux.out
ubuntu.config.txt -> ubuntu.config
...
I tried many solutions..
and here i have good new file names in file.txt file, but how should i run cp command ?
Any ideas ? HELP
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.
Please review the rules, which you agreed to when you registered, if you have not already done so.
More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.
Hello there wonderful people,
I am running on Solaris 10 and with the following ksh version:
strings /bin/ksh | grep Version | tail -2
@(#)Version M-11/16/88i
Suppose I want to copy files that end in _v2 from underneath /dir1/dir2/save directory to /dir1/dir2. Basically, what I’m... (12 Replies)
Hi all!
I have 10.000 files having generally this format:
text text text
text num text num text num
text text text GAP number text text
text num text num text num RMS num
text num text num text num
...
what I want is to copy the files if the GAP number is lower than a value e.g. <100... (5 Replies)
Hi
I'm trying to writte a script (crontab) to copy files from one location to another... this is what i have:
find . -name "VPN_CALLRECORD_20130422*" | xargs cp "{}" /home/sysadm/patrick_temp/
but that is not working this is the ouput:
cp: Target... (5 Replies)
RedHat Enterprise Linux 5.4
I have some files with the extension .cdp in several directories in various mountpoints(filesystems) . I would like to find and copy all these files into a single directory /u03/diagnore/data.
How can I do this ? (3 Replies)
I need to be able to find all *.doc files by year last modified and then perform an action such as copy to folder: /documents/2011
the 'find' command seems to show the path but not the full file details, which includes the date modified as the ls command does.
I got this far with ls, but have... (2 Replies)
Ok question number two: I'd like to search a directory for multiple file types (rar, txt, deb) and depending on what's found, copy those files to folders named Rar, TextFiles, and Debs. I'm looking for speed here so the faster the script the better. I want it to be a function that I pass 1 argument... (4 Replies)
Ok i have three directories
Destination - /u/dir1 (has subdirectories dir2 which also has subdirectory dir3)
Source1 - /u/test/files/dir1/dir2/dir3
Source2 - /u/out/images/dir1/dir2/dir3
What i would like to do is copy everything from Source1 and Source2 into the Destination directory.... (3 Replies)
I am wanting to find files within a directory that are over a certain number of days old and copy them to another directory. And unfortunately not having much luck.......is someone able to help.
Would also like to add that there are literally thousands of files that I am wanting to copy in one... (3 Replies)
hi all,
can i get script find file & copy that file with path
for an example
sourse : /home/abc/
destination : /home/backup/
files which need to find : tmp*
copy these files with its absolute path inside
like :- /home/abc/x/y/z/tmp.txt to /home/backup/date/x/y/z/tmp.txt
thanks in... (15 Replies)
hi all,
can u please help me in finding all ksh file in directory and including all subdirectories and then copy those files into another directory.
thanks in advance
-bali (4 Replies)