Debian: Move the trash folder for all users to another volume
Clash Royale CLAN TAG#URR8PPP
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.
debian trash
add a comment |
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.
debian trash
At home I do not move the kitchen trash into the living room, so I can empty the kitchen trash. And at work the cleaners empty my trash bin and dispose of the trash nightly. The same policy should be implemented on your cloud server.
– fd0
Jul 21 '15 at 22:36
add a comment |
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.
debian trash
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.
debian trash
debian trash
edited Jul 21 '15 at 15:27
Adrian Leishman
asked Jul 21 '15 at 15:19
Adrian LeishmanAdrian Leishman
11
11
At home I do not move the kitchen trash into the living room, so I can empty the kitchen trash. And at work the cleaners empty my trash bin and dispose of the trash nightly. The same policy should be implemented on your cloud server.
– fd0
Jul 21 '15 at 22:36
add a comment |
At home I do not move the kitchen trash into the living room, so I can empty the kitchen trash. And at work the cleaners empty my trash bin and dispose of the trash nightly. The same policy should be implemented on your cloud server.
– fd0
Jul 21 '15 at 22:36
At home I do not move the kitchen trash into the living room, so I can empty the kitchen trash. And at work the cleaners empty my trash bin and dispose of the trash nightly. The same policy should be implemented on your cloud server.
– fd0
Jul 21 '15 at 22:36
At home I do not move the kitchen trash into the living room, so I can empty the kitchen trash. And at work the cleaners empty my trash bin and dispose of the trash nightly. The same policy should be implemented on your cloud server.
– fd0
Jul 21 '15 at 22:36
add a comment |
2 Answers
2
active
oldest
votes
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...
This is an ownCloud server. When users delete files they go to the Trash just in case they need restored. We need the server to use a MUCH larger drive or it fills up the system drive within a couple of days. So, basically, we need any files deleted to go to a Trash folder on a different volume. I don't know if this is possible.... but I hope it is.
– Adrian Leishman
Jul 21 '15 at 19:33
add a comment |
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
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f217401%2fdebian-move-the-trash-folder-for-all-users-to-another-volume%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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...
This is an ownCloud server. When users delete files they go to the Trash just in case they need restored. We need the server to use a MUCH larger drive or it fills up the system drive within a couple of days. So, basically, we need any files deleted to go to a Trash folder on a different volume. I don't know if this is possible.... but I hope it is.
– Adrian Leishman
Jul 21 '15 at 19:33
add a comment |
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...
This is an ownCloud server. When users delete files they go to the Trash just in case they need restored. We need the server to use a MUCH larger drive or it fills up the system drive within a couple of days. So, basically, we need any files deleted to go to a Trash folder on a different volume. I don't know if this is possible.... but I hope it is.
– Adrian Leishman
Jul 21 '15 at 19:33
add a comment |
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...
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...
answered Jul 21 '15 at 19:08
Interesting...Interesting...
1,60531118
1,60531118
This is an ownCloud server. When users delete files they go to the Trash just in case they need restored. We need the server to use a MUCH larger drive or it fills up the system drive within a couple of days. So, basically, we need any files deleted to go to a Trash folder on a different volume. I don't know if this is possible.... but I hope it is.
– Adrian Leishman
Jul 21 '15 at 19:33
add a comment |
This is an ownCloud server. When users delete files they go to the Trash just in case they need restored. We need the server to use a MUCH larger drive or it fills up the system drive within a couple of days. So, basically, we need any files deleted to go to a Trash folder on a different volume. I don't know if this is possible.... but I hope it is.
– Adrian Leishman
Jul 21 '15 at 19:33
This is an ownCloud server. When users delete files they go to the Trash just in case they need restored. We need the server to use a MUCH larger drive or it fills up the system drive within a couple of days. So, basically, we need any files deleted to go to a Trash folder on a different volume. I don't know if this is possible.... but I hope it is.
– Adrian Leishman
Jul 21 '15 at 19:33
This is an ownCloud server. When users delete files they go to the Trash just in case they need restored. We need the server to use a MUCH larger drive or it fills up the system drive within a couple of days. So, basically, we need any files deleted to go to a Trash folder on a different volume. I don't know if this is possible.... but I hope it is.
– Adrian Leishman
Jul 21 '15 at 19:33
add a comment |
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
add a comment |
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
add a comment |
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
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
edited May 23 '17 at 12:40
Community♦
1
1
answered Jul 22 '15 at 21:52
williamt31williamt31
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f217401%2fdebian-move-the-trash-folder-for-all-users-to-another-volume%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
At home I do not move the kitchen trash into the living room, so I can empty the kitchen trash. And at work the cleaners empty my trash bin and dispose of the trash nightly. The same policy should be implemented on your cloud server.
– fd0
Jul 21 '15 at 22:36