04-24-2009
i dont' really understand what you want to do. if you want to create multiple directory levels, mkpath should be ok. read the docs for File::Path and see examples of how to use mkpath.
10 More Discussions You Might Find Interesting
1. Programming
Hi Everyone, I really hope I could get some insight from a few of you, I've been searching the net for various resources, and this board seems to be the friendliest and most helpful by far.
I work for a medical research company and we use sun 4
and we have different studies that have their... (1 Reply)
Discussion started by: milenky
1 Replies
2. UNIX for Dummies Questions & Answers
OK, so I'm trying to finish my last individual assignment for this course, and it's the first time I've visited a forum (I've actually understood UNIX up to this point). I am having trouble with this one. I have to write a program that prompts the user to type their first name and stores it in a... (3 Replies)
Discussion started by: metalgoddess21
3 Replies
3. UNIX for Dummies Questions & Answers
I hope this makes sense, but I need help with what is indicated with %%, below :
A.) ####List active servers and send to file####
# ps -ef | grep jboss | grep sh | awk '{if ($14) {print $12;}else {print $11}}' | sort > /export/home/kthatch/script_results
client302
client306
client309... (1 Reply)
Discussion started by: kthatch
1 Replies
4. UNIX for Dummies Questions & Answers
I have this in my script:
usercount=`ldapsearch -L -b"ou=people,ou=$ou,dc=paisleyhosting,dc=com" -h"$server" -p"1391" cn=* nothing | grep -c dn`
admincount=`ldapsearch -b"ou=groups,ou=$ou,dc=paisleyhosting,dc=com" -h"$server" -p"1391" cn=USERADMIN* uniquemember | grep... (5 Replies)
Discussion started by: kthatch
5 Replies
5. Shell Programming and Scripting
Hello everyone,
I am having to do a lot of perl scripting these days and I am learning a lot.
I have this problem
I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files..
there is folder1\folder2\*.gz
and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies
6. SCO
Ok new in here so be gentle:
I'm a programmer with the need to also be a sys admin on a box running:
Client has purchased a Kyocera KM-4035 do it all machine. However, no driver exists for SCO and when I contacted their Kyocera rep he told me to install CUPS. I downloaded CUPS and ran... (2 Replies)
Discussion started by: bbxguy
2 Replies
7. Fedora
Hi Friends,
This is my first ever post on this forum. I am a new user in the Linux field. Although, I have been working for sometime with CentOS at my work, I would consider myself an amateur only in this field. :D
The way file system works in linux and the reason its open-source, has really... (7 Replies)
Discussion started by: rohitrajjain
7 Replies
8. Red Hat
Any one tell me about the list of Redhat Linux Enterprise 5 SERVERS and their functions. thanks (3 Replies)
Discussion started by: salman103
3 Replies
9. AIX
Hello,
what is the meaning of:
lparstat -i
Node Name : ****
Partition Name : ****
Partition Number : 1
Type : Shared-SMT
Mode : Capped
Entitled Capacity : 2.00
Partition Group-ID : 32769
Shared Pool ID : 0
Online Virtual CPUs : 4
Maximum Virtual CPUs : 4
Minimum Virtual CPUs :... (5 Replies)
Discussion started by: Talulah
5 Replies
10. Shell Programming and Scripting
Hi I am trying to learn shell script and i ran into an issue.
I am trying to read a file with few directories and tar them up.
I used a while loop but i end up overwriting tar file with only the last directory in the file being tared .
cat test.txt |
(
while read line
do
tar -czPf... (8 Replies)
Discussion started by: SPR
8 Replies
LEARN ABOUT MOJAVE
extutils::command
ExtUtils::Command(3pm) Perl Programmers Reference Guide ExtUtils::Command(3pm)
NAME
ExtUtils::Command - utilities to replace common UNIX commands in Makefiles etc.
SYNOPSIS
perl -MExtUtils::Command -e cat files... > destination
perl -MExtUtils::Command -e mv source... destination
perl -MExtUtils::Command -e cp source... destination
perl -MExtUtils::Command -e touch files...
perl -MExtUtils::Command -e rm_f files...
perl -MExtUtils::Command -e rm_rf directories...
perl -MExtUtils::Command -e mkpath directories...
perl -MExtUtils::Command -e eqtime source destination
perl -MExtUtils::Command -e test_f file
perl -MExtUtils::Command -e test_d directory
perl -MExtUtils::Command -e chmod mode files...
...
DESCRIPTION
The module is used to replace common UNIX commands. In all cases the functions work from @ARGV rather than taking arguments. This makes
them easier to deal with in Makefiles. Call them like this:
perl -MExtUtils::Command -e some_command some files to work on
and NOT like this:
perl -MExtUtils::Command -e 'some_command qw(some files to work on)'
For that use Shell::Command.
Filenames with * and ? will be glob expanded.
FUNCTIONS
cat
cat file ...
Concatenates all files mentioned on command line to STDOUT.
eqtime
eqtime source destination
Sets modified time of destination to that of source.
rm_rf
rm_rf files or directories ...
Removes files and directories - recursively (even if readonly)
rm_f
rm_f file ...
Removes files (even if readonly)
touch
touch file ...
Makes files exist, with current timestamp
mv
mv source_file destination_file
mv source_file source_file destination_dir
Moves source to destination. Multiple sources are allowed if destination is an existing directory.
Returns true if all moves succeeded, false otherwise.
cp
cp source_file destination_file
cp source_file source_file destination_dir
Copies sources to the destination. Multiple sources are allowed if destination is an existing directory.
Returns true if all copies succeeded, false otherwise.
chmod
chmod mode files ...
Sets UNIX like permissions 'mode' on all the files. e.g. 0666
mkpath
mkpath directory ...
Creates directories, including any parent directories.
test_f
test_f file
Tests if a file exists. Exits with 0 if it does, 1 if it does not (ie. shell's idea of true and false).
test_d
test_d directory
Tests if a directory exists. Exits with 0 if it does, 1 if it does not (ie. shell's idea of true and false).
dos2unix
dos2unix files or dirs ...
Converts DOS and OS/2 linefeeds to Unix style recursively.
SEE ALSO
Shell::Command which is these same functions but take arguments normally.
AUTHOR
Nick Ing-Simmons "ni-s@cpan.org"
Maintained by Michael G Schwern "schwern@pobox.com" within the ExtUtils-MakeMaker package and, as a separate CPAN package, by Randy Kobes
"r.kobes@uwinnipeg.ca".
perl v5.18.2 2014-01-06 ExtUtils::Command(3pm)