Sponsored Content
Full Discussion: How to copy a file..
Top Forums UNIX for Dummies Questions & Answers How to copy a file.. Post 302494770 by DallasT on Tuesday 8th of February 2011 10:07:33 AM
Old 02-08-2011
How to copy a file..

Guys I have a question:

I am inside:

/home/student/test
and there is a file called TestServer.jar

I need to copy another file that is inside:

/home/student2/built/System.ini

to my test folder.

What command should I use to copy System.ini as TestServer.jar

It is like renaming the System.ini as TestServer.jar

Thanks
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to copy a file to a directory ,where file and dir are sent as args to a function?

Hi all, I wanted to know how i can copy a file to a directory and then verify if that file is completely copied or not? Now the issues here is that the dir and the source file are to be sent as arguments to a function( this function should actually copy the files to a dir, then check if its... (0 Replies)
Discussion started by: wrapster
0 Replies

2. Shell Programming and Scripting

Bash copy file contents into an existing file at a specific location

Hi all I need to copy the entire contents of one file into an existing file at a specific location. I know the exact line number where I need to put it. It appears I would use either sed or awk to do this, but I have been unsuccessful so far: File A line 1 line 2 line 3 line 4 ... (6 Replies)
Discussion started by: gshepherd7
6 Replies

3. UNIX for Dummies Questions & Answers

Copy a file from a dvd to the local AIX file system

Hi, I am a newbie to AIX, so please bear with me. I have mounted a dvd drive on AIX. I am trying to copy the file that is on the dvd drive on to the local machine. However, I get an error: cp: c1m_0001.gz: A system call received a parameter that is not valid. Can some one point me to the... (1 Reply)
Discussion started by: anurag1510
1 Replies

4. UNIX for Dummies Questions & Answers

Copy a windows CVS file to the unix server as a svs file

I so desperately need a script to copy a windows csv file to my unix server and i know these should be at dummies but i have no bits. it is life & no job situation help please. thanks (1 Reply)
Discussion started by: zhegal
1 Replies

5. Red Hat

Copy certain file types recursively while maintaining file structure on destination?

Hi guys, I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash. I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also... (1 Reply)
Discussion started by: rockf1bull
1 Replies

6. Programming

how to copy downloaded file into my source file folder (putty/unix)

I need to "Ensure that when you download libchat.a from the VLE you have copied it to the same folder on ius as your source files. You then refer to the library (and the libraries it needs) with: gcc -o outputfile sourcefile.c -L. -lchat -lsocket -lnsl" But I have no idea what this means! (I... (2 Replies)
Discussion started by: fakuse
2 Replies

7. Shell Programming and Scripting

how to copy the directory but not copy certain file

Hi experts cp bin root src /mnt but not copy bin/bigfile any help? ( I post this thread in the "redhat" forum wrongly, I don't know how to withdraw that question in that wrong forum) Thanks (6 Replies)
Discussion started by: yanglei_fage
6 Replies

8. Shell Programming and Scripting

Change the file name and copy old file content to new file names.

Hi, I have a files in a directory as below :- ls -1 mqdepth-S1STC02 proc-mq-S1STC01 proc-mq-S1STC02 proc-mq-S1STC03 Whereever i have S1STC i need to copy them into new file with file name S2STC. expected output :- ls -1 mqdepth-S2STC02 proc-mq-S2STC01 proc-mq-S2STC02... (3 Replies)
Discussion started by: satishmallidi
3 Replies

9. UNIX for Beginners Questions & Answers

Copy the content from txt file and create a html file

I have a txt file with a list of error messages in a xml tag format, and each error message is separated with a identifier(endresult).Need to split that and copy and create a new html file.Error message has some special character. how to escape the special character and insert my data into the... (7 Replies)
Discussion started by: DevAakash
7 Replies
Jifty::Test(3pm)					User Contributed Perl Documentation					  Jifty::Test(3pm)

NAME
Jifty::Test - Jifty's test module SYNOPSIS
use Jifty::Test tests => 5; # to load po for test: # use Jifty::Test tests => 5, l10n => 1; # ...all of Test::More's functionality... my $model = MyApp::Model::MyModel->new; $model->create(); ok($model->id, 'model works'); is($model->foo, 'some default', 'default works'); # Startup an external server (see Jifty::TestServer) my $server = Jifty::Test->make_server; my $server_url = $server->started_ok; # You're probably also interested in Jifty::Test::WWW::Mechanize DESCRIPTION
Jifty::Test is a superset of Test::More. It provides all of Test::More's functionality in addition to the class methods defined below. METHODS
is_passing my $is_passing = Jifty::Test->is_passing; Check if the test is currently in a passing state. o All tests run so far have passed o We have run at least one test o We have not run more than we planned (if we planned at all) is_done my $is_done = Jifty::Test->is_done; Check if we have run all the tests we've planned. If the plan is 'no_plan' then is_done() will return true if at least one test has run. setup ARGS This method is passed a single argument. This is a reference to the array of parameters passed in to the import statement. Merges the "test_config" into the default configuration, resets the database, and resets the fake "outgoing mail" folder. This is the method to override if you wish to do custom setup work, such as insert test data into your database. package MyApp::Test; use base qw/ Jifty::Test /; sub setup { my $self = shift; my $args = shift; # Make sure to call the super-class version $self->SUPER::setup($args); # Now that we have the database and such... my %test_args = @$args; if ($test_arg{something_special}) { # do something special... } } And later in your tests, you may do the following: use MyApp::Test tests => 14, something_special => 1; # 14 tests with some special setup... setup_test_database Create the test database. This can be overloaded if you do your databases in a different way. load_test_configs FILENAME This will load all the test config files that apply to FILENAME (default: $0, the current test script file). Say you are running the test script "/home/bob/MyApp/t/user/12-delete.t". The files that will be loaded are: "/home/bob/MyApp/t/user/12-delete.t-config.yml" "/home/bob/MyApp/t/user/test_config.yml" "/home/bob/MyApp/t/test_config.yml" ..followed by the usual Jifty configuration files (such as "MyApp/etc/config.yml" and "MyApp/etc/site_config.yml"). The options in a more specific test file override the options in a less specific test file. The options are returned in a single hashref. test_config Returns a hash which overrides parts of the application's configuration for testing. By default, this changes the database name by appending a 'test', as well as setting the port to a random port between 10000 and 15000. Individual test configurations may override these defaults (see "load_test_configs"). It is passed the current configuration before any test config is loaded. You can override this to provide application-specific test configuration, e.g: sub test_config { my $class = shift; my ($config) = @_; my $hash = $class->SUPER::test_config($config); $hash->{framework}{LogConfig} = "etc/log-test.conf" return $hash; } Note that this is deprecated in favor of having real config files in your test directory. make_server Creates a new Jifty::TestServer depending on the value of $ENV{JIFTY_TEST_SERVER}. If the environment variable is "Inline", we run tests using PSGI inline without spawning an actual server. Otherwise, we fork off a Plack::Server to run tests against. web Like calling "<Jifty-"web>>. "<Jifty::Test-"web>> does the necessary Jifty->web initialization for it to be usable in a test. mailbox A mailbox used for testing mail sending. setup_mailbox Clears the mailbox. teardown_mailbox Deletes the mailbox. is_available Informs Email::Send that Jifty::Test is always available as a mailer. send Should not be called manually, but is automatically called by Email::Send when using Jifty::Test as a mailer. (Note that it is a class method.) messages Returns the messages in the test mailbox, as a list of Email::Simple objects. You may have to use a module like Email::MIME to parse multi-part messages stored in the mailbox. test_file my $files = Jifty::Test->test_file($file); Register $file as having been created by the test. It will be cleaned up at the end of the test run if and only if the test passes. Otherwise it will be left alone. It returns $file so you can do this: my $file = Jifty::Test->test_file( Jifty::Util->absolute_path("t/foo") ); test_in_isolation my $return = Jifty::Test->test_in_isolation( sub { ...your testing code... }); For testing testing modules so you can run testing code (which perhaps fail) without effecting the outer test. Saves the state of Jifty::Test's Test::Builder object and redirects all output to dev null before running your testing code. It then restores the Test::Builder object back to its original state. # Test that fail() returns 0 ok !Jifty::Test->test_in_isolation sub { return fail; }; SEE ALSO
Jifty::Test::WWW::Mechanize, Jifty::TestServer perl v5.14.2 2010-12-08 Jifty::Test(3pm)
All times are GMT -4. The time now is 03:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy