05-27-2011
Unlink and copy actual file
Hello,
I have a set of directories, which has inside them, symbolic links to some files. What i would like to do is to covert the links into actual files, i.e. remove the link and copy the actual file here...
I tried to see unlink command but i think all it does is delete the link, is there anything that would transform the link to the actual copy ?
Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi all
I did something incorrectly about link command.
I try to make a link from a sub-dir to root dir, but I use the following command:
link / zzz
the result is sub-dir "zzz" was linked to "/"
Then I want to remove the "zzz" by using unlink command:
unlink zzz
It say that "Device... (1 Reply)
Discussion started by: umonk
1 Replies
2. UNIX for Dummies Questions & Answers
Hello all,
I have a script which runs every 15 minutes and moves all but latest 10 files from a directory (A) to Directory (B).
Most of the times this job runs fine but sometimes it is giving "mv: cannot unlink {Target Directory name } : Permissions denied."
Any help about this error msg... (1 Reply)
Discussion started by: super_duper_guy
1 Replies
3. Shell Programming and Scripting
Hi,
I have a two lines of code both intend to perform the same task.
unlink $CtrFile;
system ("rm $CtrFile");
Both of which try to delete a certain file. However when I use the unlink command the file does not get deleted. When I use the "rm" system... (2 Replies)
Discussion started by: jerardfjay
2 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I have a file entries.txt that contains a number of entries all on seperate lines e.g.
test1
test2
test3
test4
Then in a directory called /TestFiles I have a number of files that could contain the above text in the file name
e.g. qwertytest1.csv qwertytest2.csv... (2 Replies)
Discussion started by: not4google
2 Replies
5. Shell Programming and Scripting
Hi,
i have a sql file named sample.sql. The query is given below.
select count(*) from $TABLE_NAME
In the main script, i am sourcing this sql. I need to replace the $TABLE_NAME with actual value, before running the query. How can i achieve that?
The logic i tried is given below:... (3 Replies)
Discussion started by: bharathappriyan
3 Replies
6. Solaris
Using lsof command I was able to query all Regular Files opened for write.
A specific processID related output shows some FileDescriptors(FD 45 in second output 45w) pointing to real file. But most of the FDs(1, 2, 5 in first output and 31,29,10 in second output) are pointing to root of the disk... (19 Replies)
Discussion started by: kchinnam
19 Replies
7. Shell Programming and Scripting
Here is my script which gives the below output when I run.First it will display the list of all groups and then ask for enter the group name and after it will ask for contribuotors or users then I will add contribuotirs or users and it will show the list of all users associated with that group but... (3 Replies)
Discussion started by: rohit22hamirpur
3 Replies
8. Shell Programming and Scripting
I am very noobish to UNIX, our guy is on vacation so I am trying to take up some slack while he is away.
Typically when we use sql from within a shell script, we do so from a file containing the sql.
Example:
$ORACLE_HOME/bin/sqlplus $ORA_DBCU/$ORA_DBCP @${cron_dir}/${report_file}.sql
... (10 Replies)
Discussion started by: biobill
10 Replies
9. Shell Programming and Scripting
I wish to unlink multiple links, but man pages shows
unlink - call the unlink function to remove the specified file
let's linked are in number sequence and I'm doing
unlink `echo {1..500}`
This fails..
Is their any other command to execute it or I need to call the unlink function that... (1 Reply)
Discussion started by: posix
1 Replies
10. Shell Programming and Scripting
Greetings Experts,
I am on AIX using ksh; I am processing the input files and generating a awk_output.txt file using AWK. By reading that awk_output.txt file, I am building a output.html file which is cat and then fed to /usr/sbin/sendmail .When the shell script is triggered through command... (2 Replies)
Discussion started by: chill3chee
2 Replies