Sponsored Content
Special Forums UNIX Desktop Questions & Answers Why can't I save a VI file after entering data? Post 302393633 by jgt on Tuesday 9th of February 2010 09:11:00 AM
Old 02-09-2010
You need a space after 'cp' and between the source and destination.
The destination can be either a file name or a directory[folder]
The source name can be absolute or relative to the current directory.
You need to have read permissions for the source file, and write permissions for the destination directory.


Code:
cp /homefolder/file1 /destinationfolder/file2

 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Can ZFS Save my Data

Hello, Our RAID and server recently crashed and we are trying to recover our data. The problem appears to be that the Veritas File System/Logical Volume Manger became corrupt on our RAID. We are down to our last option, which is to run some Veritas commands that "may" result in data loss. ... (1 Reply)
Discussion started by: stringman
1 Replies

2. Shell Programming and Scripting

Data fetched from text file and save in a csv file

Hi i have wriiten a script which fetches the data from text file, and saves in the output in a text file itself, but i want that the output should save in different columns. I have the output like: For Channel:response_time__24.txt 1547 data points 0.339 0.299 0.448 0.581 7.380 ... (1 Reply)
Discussion started by: rohitkalia
1 Replies

3. Shell Programming and Scripting

select data from oracle table and save the output as csv file

Hi I need to execute a select statement in a solaris environment with oracle database. The select statement returns number of rows of data. I need the data to be inserted into a CSV file with proper format. For that we normally use "You have to select all your columns as one big string,... (2 Replies)
Discussion started by: rdhanek
2 Replies

4. Shell Programming and Scripting

perl-data from file save to multidimensional array

i have a file,like 1 3 4 5 6 7 8 9 i want to save it into an array. and then i want to get every element, because i want to use them to calculate. for example: i want to calculate 1 + 3. but i cannot reach my goal. open (FILE, "<", "number"); my @arr; while (<FILE>){ chomp;... (1 Reply)
Discussion started by: pp-zz
1 Replies

5. Shell Programming and Scripting

How to add data from 2 input files and save it in 1 output file

Hi, i have 2 input files which are file1.txt and file2.txt. I need to extract data from file1.txt and file2.txt and save it in file3.txt like example below:- File1.txt ID scrap1 Name scrap1 start 1 end 10 ID scrap2 Name scrap2 start 11 end ... (4 Replies)
Discussion started by: redse171
4 Replies

6. Solaris

Login delay after entering id (40 secs) same after entering pw

Hi all, I have just installed Solaris 10 on an old Fujitsu Primepower 650 which has been wiped clean. I haven't installed anything apart from the OS yet, so the machine is 99% idle. I get long delays when logging in, first after entering the id then another long delay after entering a valid... (8 Replies)
Discussion started by: longjon
8 Replies

7. Shell Programming and Scripting

Get Permissions and save to data

Hi all; I have the following code which gives me kind of what I need: #!/usr/bin/perl use Fcntl ':mode'; # if ($ARGV ne "") { $filename = $ARGV; } else { print "Please specify a file!\n"; exit; } # if... (2 Replies)
Discussion started by: gvolpini
2 Replies

8. Shell Programming and Scripting

Open Text file input data and save it.

Hi Guys, I have blank file A.txt I will run the script xyz.sh First i want to open a.txt file... Now i will enter some data like XYZ ABC PQR .. Save it and keep continue my script.... END of my script. Thanks (1 Reply)
Discussion started by: asavaliya
1 Replies

9. UNIX for Advanced & Expert Users

How to save a data of a file into a variable?

My requirement is to read a column data from a file & save it in a variable for each row & process it. I am using the below code- Leadlines="$TGTFILE/Error.txt">>$log_file while read line do id = ` echo $line | cut -d "," -f1 ` email = ` echo $line | cut -d "," -f2 ` ----------- done My... (2 Replies)
Discussion started by: saga20
2 Replies

10. UNIX for Dummies Questions & Answers

Get a data and save

If I have a A.log 1 Air Flow Monitor : 34.070 Degrees C 2 Air Flow Monitor : 41.730 Degrees C 3 Air Flow Monitor : 35.340 Degrees C 4 Air Flow Monitor : 33.370 Degrees C 5 Air Flow Monitor : 36.770 Degrees C 6 Air Flow Monitor : 45.910 Degrees C 7 Air Flow Monitor ... (1 Reply)
Discussion started by: sabercats
1 Replies
FS_COPYACL(1)						       AFS Command Reference						     FS_COPYACL(1)

NAME
       fs_copyacl - Copies an ACL from a directory to one or more other directories

SYNOPSIS
       fs copyacl -fromdir <source directory (or DFS file)>
	   -todir <destination directory (or DFS file)>+
	   [-clear] [-id] [-if] [-help]

       fs co -f <source directory (or DFS file)>
	   -t <destination directory (or DFS file)>+
	   [-c] [-id] [-if] [-h]

DESCRIPTION
       The fs copyacl command copies the access control list (ACL) from a source directory to each specified destination directory. The source
       directory's ACL is unchanged, and changes to the destination directory's ACL obey the following rules:

       o   If an entry on the source ACL does not already exist on the destination ACL, it is added.

       o   If an entry exists on both the source and destination ACLs, the permissions from the source ACL entry replace the current permissions
	   on the destination ACL entry.

       o   If an entry on the destination ACL has no corresponding entry on the source ACL, it is removed if the -clear flag is included and is
	   unchanged otherwise. In other words, if the -clear flag is provided, the source ACL completely replaces the destination ACL.

       When using this command to copy ACLs between objects in DFS filespace accessed via the AFS/DFS Migration Toolkit Protocol Translator, it is
       possible to specify files, as well as directories, with the -fromdir and -todir arguments.

CAUTIONS
       Do not copy ACLs between AFS and DFS files or directories. The ACL formats are incompatible.

OPTIONS
       -fromdir <source directory>
	   Specifies the source directory from which to copy the ACL.  (Specifying an AFS file copies its directory's ACL, but specifying a DFS
	   file copies its own ACL.) A partial pathname is interpreted relative to the current working directory.

       -todir <destination directory>
	   Specifies each directory for which to alter the ACL to match the source ACL. (Specifying an AFS file halts the command with an error,
	   but specifying a DFS file alters the file's ACL). A partial pathname is interpreted relative to the current working directory.

	   Specify the read/write path to each directory (or DFS file), to avoid the failure that results from attempting to change a read-only
	   volume. By convention, the read/write path is indicated by placing a period before the cell name at the pathname's second level (for
	   example, "/afs/.abc.com"). For further discussion of the concept of read/write and read-only paths through the filespace, see the fs
	   mkmount reference page.

       -clear
	   Replaces the ACL of each destination directory with the source ACL.

       -id Modifies the Initial Container ACL of each DFS directory named by the -todir argument, rather than the regular Object ACL. This
	   argument is supported only when both the source and each destination directory reside in DFS and are accessed via the AFS/DFS Migration
	   Toolkit Protocol Translator.

       -if Modifies the Initial Object ACL of each DFS directory named by the -todir argument, rather than the regular Object ACL. This argument
	   is supported only when both the source and each destination directory reside in DFS and are accessed via the AFS/DFS Migration Toolkit
	   Protocol Translator.

       -help
	   Prints the online help for this command. All other valid options are ignored.

EXAMPLES
       The following example command copies the current working directory's ACL to its subdirectory called reports. Note that the source
       directory's ACL is unaffected. Entries on the reports directory's that are not on the source ACL of the current directory remain unaffected
       as well, because the -clear flag is not used.

	  % fs listacl . reports
	  Access list for . is
	  Normal rights:
	     pat rlidwka
	     smith rlidwk
	  Access list for reports is
	  Normal rights:
	     pat rl
	     pat:friends rl
	  Negative rights
	     jones rlidwka

	  % fs copyacl -fromdir . -todir reports

	  % fs listacl . reports
	  Access list for . is
	  Normal rights:
	     pat rlidwka
	     smith rlidwk
	  Access list for reports is
	  Normal rights:
	     pat rlidwka
	     pat:friends rl
	     smith rlidwk
	  Negative rights
	     jones rlidwka

PRIVILEGE REQUIRED
       To copy an ACL between AFS objects, the issuer must have the "l" (lookup) permission on the source directory's ACL and the "a" (administer)
       permission on each destination directory's ACL. If the -fromdir argument names a file rather than a directory, the issuer must have both
       the "l" and "r" (read) permissions on the ACL of the file's directory.

       To copy an ACL between DFS objects, the issuer must have the r permission on the source directory or file's ACL and the "c" (control)
       permission on each destination directory or file's ACL.

SEE ALSO
       fs_listacl(1), fs_mkmount(1), fs_setacl(1)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							     FS_COPYACL(1)
All times are GMT -4. The time now is 05:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy