how to re-create the .Trash file in ubuntu server
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
-3
down vote
favorite
I recently deleted the .Trash
file in Ubuntu server using the command
alias rm="mv -t ~/.Trash"
and now I am unable to delete any file using rm
command, and when I use it I get:
mv: accessing `/home/user1/.Trash': No such file or directory.
How can I re-create the .Trash
file to be able to delete files?
server trash rm
add a comment |Â
up vote
-3
down vote
favorite
I recently deleted the .Trash
file in Ubuntu server using the command
alias rm="mv -t ~/.Trash"
and now I am unable to delete any file using rm
command, and when I use it I get:
mv: accessing `/home/user1/.Trash': No such file or directory.
How can I re-create the .Trash
file to be able to delete files?
server trash rm
1
trymkdir ~/.Trash
â Eskander Bejaoui
May 19 at 23:11
it works ! thank you so much
â Maen Salman
May 19 at 23:12
1
no problem. I want to note that you're not deleting files with that alias, you're just moving them to another directory. is that the intended behaviour? Ubuntu server doesn't use a "trash" by default
â Eskander Bejaoui
May 19 at 23:26
add a comment |Â
up vote
-3
down vote
favorite
up vote
-3
down vote
favorite
I recently deleted the .Trash
file in Ubuntu server using the command
alias rm="mv -t ~/.Trash"
and now I am unable to delete any file using rm
command, and when I use it I get:
mv: accessing `/home/user1/.Trash': No such file or directory.
How can I re-create the .Trash
file to be able to delete files?
server trash rm
I recently deleted the .Trash
file in Ubuntu server using the command
alias rm="mv -t ~/.Trash"
and now I am unable to delete any file using rm
command, and when I use it I get:
mv: accessing `/home/user1/.Trash': No such file or directory.
How can I re-create the .Trash
file to be able to delete files?
server trash rm
edited May 20 at 9:35
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
David Foerster
25.9k1361106
25.9k1361106
asked May 19 at 23:05
Maen Salman
32
32
1
trymkdir ~/.Trash
â Eskander Bejaoui
May 19 at 23:11
it works ! thank you so much
â Maen Salman
May 19 at 23:12
1
no problem. I want to note that you're not deleting files with that alias, you're just moving them to another directory. is that the intended behaviour? Ubuntu server doesn't use a "trash" by default
â Eskander Bejaoui
May 19 at 23:26
add a comment |Â
1
trymkdir ~/.Trash
â Eskander Bejaoui
May 19 at 23:11
it works ! thank you so much
â Maen Salman
May 19 at 23:12
1
no problem. I want to note that you're not deleting files with that alias, you're just moving them to another directory. is that the intended behaviour? Ubuntu server doesn't use a "trash" by default
â Eskander Bejaoui
May 19 at 23:26
1
1
try
mkdir ~/.Trash
â Eskander Bejaoui
May 19 at 23:11
try
mkdir ~/.Trash
â Eskander Bejaoui
May 19 at 23:11
it works ! thank you so much
â Maen Salman
May 19 at 23:12
it works ! thank you so much
â Maen Salman
May 19 at 23:12
1
1
no problem. I want to note that you're not deleting files with that alias, you're just moving them to another directory. is that the intended behaviour? Ubuntu server doesn't use a "trash" by default
â Eskander Bejaoui
May 19 at 23:26
no problem. I want to note that you're not deleting files with that alias, you're just moving them to another directory. is that the intended behaviour? Ubuntu server doesn't use a "trash" by default
â Eskander Bejaoui
May 19 at 23:26
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
You can (re-)create directories with the mkdir
command. In this case:
mkdir -m 700 ~/.Trash
-m 700
sets the directory access mode to prohibit access to other users since they shouldn't normally snoop in your trash even if they otherwise share read access to your home directory.
Additionally you should probably remove the misleading rm
alias:
unalias rm
If you want a command to move files to trash like many (graphical) file managers do you can use the gvfs-trash
application from the gvfs-bin
package (not installed by default in Ubuntu Server). If that's too long to type for you you can set up an alias similar to this:
alias trash='gvfs-trash'
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You can (re-)create directories with the mkdir
command. In this case:
mkdir -m 700 ~/.Trash
-m 700
sets the directory access mode to prohibit access to other users since they shouldn't normally snoop in your trash even if they otherwise share read access to your home directory.
Additionally you should probably remove the misleading rm
alias:
unalias rm
If you want a command to move files to trash like many (graphical) file managers do you can use the gvfs-trash
application from the gvfs-bin
package (not installed by default in Ubuntu Server). If that's too long to type for you you can set up an alias similar to this:
alias trash='gvfs-trash'
add a comment |Â
up vote
0
down vote
accepted
You can (re-)create directories with the mkdir
command. In this case:
mkdir -m 700 ~/.Trash
-m 700
sets the directory access mode to prohibit access to other users since they shouldn't normally snoop in your trash even if they otherwise share read access to your home directory.
Additionally you should probably remove the misleading rm
alias:
unalias rm
If you want a command to move files to trash like many (graphical) file managers do you can use the gvfs-trash
application from the gvfs-bin
package (not installed by default in Ubuntu Server). If that's too long to type for you you can set up an alias similar to this:
alias trash='gvfs-trash'
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You can (re-)create directories with the mkdir
command. In this case:
mkdir -m 700 ~/.Trash
-m 700
sets the directory access mode to prohibit access to other users since they shouldn't normally snoop in your trash even if they otherwise share read access to your home directory.
Additionally you should probably remove the misleading rm
alias:
unalias rm
If you want a command to move files to trash like many (graphical) file managers do you can use the gvfs-trash
application from the gvfs-bin
package (not installed by default in Ubuntu Server). If that's too long to type for you you can set up an alias similar to this:
alias trash='gvfs-trash'
You can (re-)create directories with the mkdir
command. In this case:
mkdir -m 700 ~/.Trash
-m 700
sets the directory access mode to prohibit access to other users since they shouldn't normally snoop in your trash even if they otherwise share read access to your home directory.
Additionally you should probably remove the misleading rm
alias:
unalias rm
If you want a command to move files to trash like many (graphical) file managers do you can use the gvfs-trash
application from the gvfs-bin
package (not installed by default in Ubuntu Server). If that's too long to type for you you can set up an alias similar to this:
alias trash='gvfs-trash'
edited May 21 at 23:06
answered May 20 at 9:42
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
David Foerster
25.9k1361106
25.9k1361106
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1038224%2fhow-to-re-create-the-trash-file-in-ubuntu-server%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
1
try
mkdir ~/.Trash
â Eskander Bejaoui
May 19 at 23:11
it works ! thank you so much
â Maen Salman
May 19 at 23:12
1
no problem. I want to note that you're not deleting files with that alias, you're just moving them to another directory. is that the intended behaviour? Ubuntu server doesn't use a "trash" by default
â Eskander Bejaoui
May 19 at 23:26