How to dynamically create user name in perl and move the files?
Hi,
I have two problems in which i have stuck up.
a) To move the files and copy back.
b) To create user dynamically.
Question 1:
I have to move the files to some other directory and copy it when all the process is done.
I have the code like this:
The problem here is i am able to move the files but again coping back is not happening. The entire directory is getting replaced.
How can i move the files from one directory to another and again copy it back to same directory?
Question 2:
I have to create a dummy user name dynamically how can i create dummy username dynamically. At present i am a root user.
How can i create dummy user name dynamically?
After creating dynamically i need to copy to this user created login and create the directory and move this file1.txt.
Why do you want to mv files from one dir to another and then again copy them back ? You could instead just copy them in the first place. Perhaps explaining what you're trying to do will help us help you better ?
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Hi Team,
I have over 1 lakh pdf files.
I want to create folders like Disk-1, Disk-2 ..... & want to move 3000 pdfs per folder. Can i do it by script? Please help me.
Thanks & Regards
Parag Nehete (4 Replies)
Hi, How to create array every time user input and store user input and display all array
print " Enter input "
my @input = split(' ', $input)
chmop($input = <STDIN>;
foreach ($input)
{
@array= @input;
}
print @array"\n"; (1 Reply)
Hi,
I have one file name file.txt
It has the following contents:
#File Contents
StartTime,EndTime,COUNTER1,COUNTER2,COUNTER3
12:13,12:14,0,1,0
The output should be like this:
StartTime: 12:13
ENDTIME: 12:14 (2 Replies)
I have a bash challenge. I have several virtualization hosts for which I need to collect VM information. I need to dynamically create an array for each host. The contents of the array should be the list VMs running on the host. Here's the logic; I just need someone to help me with the details:... (0 Replies)
I'm trying to write a script that generates a file of varying size filled with random text and am having some difficulties.
The major problems are that I'm limited to csh and a lot of the systems I have to run this on don't have a /dev/random (so a wrapper around the dd if=/dev/random or dd... (14 Replies)
I need to write a script to move files only when they are not in use. I have a rudementry bash script for Linux but i need a perl script so it will work on Linux and hpux. Oracle writes files to a directory called /data and the files there are moved every 5 minutes to a new home. But i need to... (1 Reply)
Hi all,
I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)