LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-02-2006, 04:10 AM   #1
bujecas
Member
 
Registered: Oct 2004
Location: Portugal
Distribution: Debian, Slackware
Posts: 78

Rep: Reputation: 20
chroot problem


Hello,

I want to do a command with chroot and append the output to a file in the chrooted environment. For example this command:

chroot /mnt/test ls >> file.log

This appends the ls output to file.log in the current filesystem, not in the chrooted, and I want the opposite.

Any ideia how to do it without going first to the chrooted environment and execute the command inside?

Thanks.
 
Old 01-02-2006, 05:09 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Quote:
Any ideia how to do it without going first to the chrooted environment and execute the command inside?
Without going first to the chrooted environment would be:
cd /mnt/test ls >> file.log
or
ls /mnt/test >> /mnt/test/file.log
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot problem rjkfsm Linux - Software 1 07-19-2005 10:46 AM
chroot problem bruse Linux - Security 3 07-04-2005 06:57 AM
problem with chroot ef_ Linux - Security 6 10-14-2004 06:46 AM
I have a problem with chroot. vintermann Linux - Software 2 01-31-2004 07:57 AM
Chroot problem lokiz Linux - Networking 2 06-14-2001 09:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:00 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration