02-10-2011
HTML Code:
cd /home/david/lab3
for i in ls *.save
do
cp $i /home/user113/lab3
done
^^^ above will also work if you modify the 1st line by adding 'tics':
for i in `ls *.save`
Cheers
Momin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
what command would i wrote to copy files from $folder1 to $folder2 ???? (1 Reply)
Discussion started by: perleo
1 Replies
2. Linux
sir
can any body tell me how i can copy files like
copy c:\abc\pqr\mr.txt c:\windows\my documents\this.txt
i need command in linux like this
really i am a new in linux that is why simple questions
alson can any body explain me how i get current directory tree or path
in windows... (2 Replies)
Discussion started by: sadiquep
2 Replies
3. Shell Programming and Scripting
i need to copy some files from a directory and move the copy files to some destination with the extension .dat
Can any one help on this (5 Replies)
Discussion started by: ranga27
5 Replies
4. UNIX for Dummies Questions & Answers
How can we copy a command string from a previous command line and paste it into the cursor position on the current command line? I know that ^c will not work as the shell will interpret as an interrupt signal.
Thanks, (1 Reply)
Discussion started by: Pouchie1
1 Replies
5. Shell Programming and Scripting
i want to search in the current directory all the files that contain one word for example "hello"
i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies
6. Shell Programming and Scripting
how can i copy only those files with creation date less then 24 hours. (1 Reply)
Discussion started by: Danish Shakil
1 Replies
7. Shell Programming and Scripting
Hello,
I have a directory in which I have files as follows
CRDT.csv
CRDT.csv.1
CRDT.csv.2
....
CRDT.csv.n
I would like to copy it over to another directory as
crdt_lon.csv
crdt_lon.csv.1
crdt_lon.csv.2
....
crdt_lon.csv.n
I am looking for a one line command but I am... (5 Replies)
Discussion started by: srattani
5 Replies
8. Shell Programming and Scripting
I am new to this forum. I have a script which randomly throws error.Following are steps followed in this script:
Generate Term file
Remove previous term and rpt files from utility directory.
copy term file to utility directory
call sql to generate rpt file using term file as input
copy the... (4 Replies)
Discussion started by: ann15
4 Replies
9. Shell Programming and Scripting
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies
10. UNIX for Dummies Questions & Answers
Hi ,
I am trying to take a backup of file before overwriting it with cp command, I am using the command cp -b.
-rw-rw-r-- 1 autoengine murex 0 Jan 22 07:08 a
-rw-rw-r-- 1 autoengine murex 0 Jan 22 07:08 b
cp -b a b
-rw-rw-r-- 1 autoengine murex 0 Jan 22 07:08 a
-rw-rw-r-- 1... (1 Reply)
Discussion started by: Raj999
1 Replies
LEARN ABOUT SUNOS
install
install(1B) SunOS/BSD Compatibility Package Commands install(1B)
NAME
install - install files
SYNOPSIS
/usr/ucb/install [-cs] [-g group] [-m mode] [-o owner] filename1 filename2
/usr/ucb/install [-cs] [-g group] [-m mode] [-o owner] filename... directory
/usr/ucb/install -d [-g group] [-m mode] [-o owner] directory
DESCRIPTION
install is used within makefiles to copy new versions of files into a destination directory and to create the destination directory itself.
The first two forms are similar to the cp(1) command with the addition that executable files can be stripped during the copy and the owner,
group, and mode of the installed file(s) can be given.
The third form can be used to create a destination directory with the required owner, group and permissions.
Note: install uses no special privileges to copy files from one place to another. The implications of this are:
o You must have permission to read the files to be installed.
o You must have permission to copy into the destination file or directory.
o You must have permission to change the modes on the final copy of the file if you want to use the -m option to change modes.
o You must be superuser if you want to specify the ownership of the installed file with -o. If you are not the super-user, or if -o is
not in effect, the installed file will be owned by you, regardless of who owns the original.
OPTIONS
-c Copy files. In fact install always copies files, but the -c option is retained for backwards compatibility with old shell
scripts that might otherwise break.
-d Create a directory. Missing parent directories are created as required as in mkdir -p. If the directory already exists, the
owner, group and mode will be set to the values given on the command line.
-s Strip executable files as they are copied.
-g group Set the group ownership of the installed file or directory. (staff by default.)
-m mode Set the mode for the installed file or directory. (0755 by default.)
-o owner If run as root, set the ownership of the installed file to the user-ID of owner.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO
chgrp(1), chmod(1), chown(1), cp(1), mkdir(1), strip(1), install(1M), attributes(5)
SunOS 5.10 14 Sep 1992 install(1B)