How to empty trash in fedora xfce command line? - command-line

Command like this:
rm -rf ~/.local/share/Trash/*
doesn't remove all files from trash, are there any other path to trash files?
Updated:
simply files from other drive store into other folder.

If files from second drive, trash files store on that drive, for example you can have
/run/media/<username>/<uuid>/.Trash-1000/files/*
only files deleted from home folder store into:
~/.local/share/.Trash
So it was done to avoid copy files from another driver to local trash.

Related

command prompt: how would you move subfolders to parent folder?

I want to move whole folders instead of files inside the subfolder. I tried MOVE command but I can only move files. Is there any other command?
Assuming you're on Windows:
You may need to move the contents of the folder to another folder:
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
example:
move c:\windows\temp\*.* c:\temp
Move the files of c:\windows\temp to the temp directory in root, this is of course assuming you have the Windows\temp directory. In this example, . is wildcards telling the computer every file with every extension.
Source: http://www.computerhope.com/movehlp.htm
Alternately, this SO question's answers may help you: Command Prompt: Why do I get “cannot find the path specified” when I move a folder (with contents) from the desktop to a new directory?

How do I copy a file from my desktop, to another directory not on my desktop?

In my Desktop directory, I have a file called "ex12.txt"
I want to copy it and move it to another directory named "temp" in another location.
I've tried this:
Jahvons-MacBook-Air:desktop jahvonashmeade$ cp ex12.txt temp/
Then I get this
cp: directory temp does not exist
What exactly am i doing wrong?
EDIT: Never mind guys I found out the problem. I was skipping the root folder in the path directions.
copy/paste by chance. Seems fairly simple and easy to do

Accessing folders via MATLAB

I am trying to access some .m folders that I have downloaded into Downloads. How can I access this folder and run the files using cd similar to how I would on a Terminal (MacOS)? The same statements don't work.
All of the regular commands for linux should work.
ls, dir, cd 'your folder goes here' , cd ,, , cd.. etc
You need to pass the absolute path of your Downloads folder, e.g.:
current_dir = pwd;
cd('C:\Users\you_username\Downloads')
Then, you'll be able to access the files in that folder. When you are finished, you can then return to your original folder with:
cd(current_dir);
An alternative is to add the Downloads folder to your MATLAB path with addpath. You should then be able to access files in there from any directory of your choosing without having to cd. If you want to make that change to the MATLAB path permanent, use savepath afterwards to save the MATLAB path for future sessions.

How to move a .tar.gz file from one directory to another directory

i have a file latest.tar.gz i have to move this file to another folder.
example: file is in this path root/home/phani
i have to move this file to root/san/newwebsite/
am new to centOS pls help me grt out of from this.
In a shell window, type:
mv /root/home/phani/latest.tar.gz /root/san/newwebsite/

Switching Files Between Directories with CUI (mv command)

I am currently working through "The Command Line Crash Course" and am having trouble switching files to my desktop.
In the terminal I create a new file (awesome.txt).
I see awesome on my desktop and then I make a directory (something).
I then do:
mv awesome.txt something/
When I open the something directory in my GUI, the awesome.txt is present. Now I want to take the awesome.txt and put it back on my desktop screen. So I try the same command and format I used to get it into the something directory
mv awesome.txt desktop/
I get an error "mv: rename awesome.txt to desktop/: No such file or directory"
NOW i found this command online, and it takes awesome.txt and puts it back on my desktop from the something directory
mv awesome.txt ../ (it moves it back to the last directory it is in)
Can anyone explain why I can't use the name desktop/ to put it back on my desktop screen? Is the desktop classified as something different than a file or directory?
Thanks!
The problem is that the name "desktop/" refers to a directory called desktop that's inside your "something" directory. But the actual desktop folder is outside of your "something" directory, so you need to tell mv to look there instead.
From the something directory desktop/ is relative to that directory, so it would be looking for something/desktop/ which obviously doesn't exist.
../ just means drop back a level, which is the desktop from the something directory.
you could try /desktop/ from the something directory, but you may want to try cd /desktop/ first to see where it takes you in case /desktop is not the actual root.