LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   chroot problem (https://www.linuxquestions.org/questions/linux-general-1/chroot-problem-398574/)

bujecas 01-02-2006 04:10 AM

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.

/bin/bash 01-02-2006 05:09 AM

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


All times are GMT -5. The time now is 04:10 AM.