I need to have all deleted files for all users go into a folder on another drive. Is this possible? If so, what are the commands to permanently move the trash folder(s)?
The operating system is Debian Jessie.
Thanks.
It depends on the way your system is set up. If whenever a file is deleted, it moves it into a trash directory (e.g ~/Trash/) then you can run sudo mv /home/*/Trash/* path-to-drive .
If instead you want to move every file a user deletes into a drive, then you could make a simple script in your /bin directory that goes as follows:
#!/bin/bash
sudo mv $1 path-to-drive
And then name it del. You would just have to add alias rm="del" to your /etc/bash.bashrc...
Cheers, Interesting...
Why not just create a soft link with ln?
Rather than copy from another answer here's the link. Stackoverflow: how to create a link to a directory
/home) using e.g.resticor similar software, would be the usual solution.