LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-07-2012, 12:17 PM   #1
Tealk144
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Rep: Reputation: Disabled
Logging funktion


Hi, can anyone say me how i can write in a log file what *.jar become cp, please?
Code:
echo "Update $DESC2 Plugins..."
cp -r "$DIR2"/bukkit_update/plugins/*.jar "$DIR2"/plugins/
echo "done"
 
Old 02-07-2012, 03:06 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,159

Rep: Reputation: 202Reputation: 202Reputation: 202
Hi Tealk,

I'm not sure what exactly you're looking for, but maybe this will help:

To log to the syslog system log, look at logger(1).

If you want more output from cp, use -v for verbose mode. It will print the filename of the copied target. e.g.

Code:
jameson@yellow:~$ cp -v todo  todo.bak
`todo' -> `todo.bak'
If all you want to do is log the output to some file, you can:

Code:
echo "Whatever" > output.log
cp -v src dest > output.log
HTH
Jameson
 
Old 02-07-2012, 03:19 PM   #3
Tealk144
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
ok thanks for the information, i will try it
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi funktion Printer - wich to buy? driver? strubbldesign Linux - Hardware 3 11-18-2010 07:43 AM
Logging in and logging out of a server in a script frankie_DJ Linux - Newbie 4 01-27-2007 11:03 PM
CLI -- Logging Out and Logging In StyngerSmash Linux - Newbie 1 09-05-2006 04:23 AM
lock cd-eject-funktion without mount overlord73 Linux - Software 1 03-21-2006 03:02 PM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 02:55 AM


All times are GMT -5. The time now is 08:53 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration