can't find node_modules after mv command - mv

I accidently moved my node modules to the wrong place
www
--html
--node_modules
I wanted to move them into the html folder so I used this command
mv node_modules /html
now they have disappeared where did they go?

It's look like you moved them to new directory on the root.
Try
ls -la /
You will probably see there a directory called html
/ this is the root directory of the filesystem.

Related

How to zip a list of files of the same type using jar command

I have a folder on my computer at the following path:
/path/to/folder/
This folder contains a subfolder and many cvs files
folder/subfolder
folder/1.cvs
folder/2.cvs
...
folder/n.cvs
Now, I would like to be able to zip all the .cvs files into one .zip file using the jar command (long story...)
The best I could come up with is:
jar -cvfM output.zip -C /path/to/folder .
This works, but inside output.zip I also see the subfolder, is there any way to avoid it? I tried using the * wildcard like this:
jar -cvfM output.zip -C /path/to/folder *.cvs
But it doesn't work.
Is it possible?
Thanks in advance

How to empty trash in fedora xfce 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.

Wget - Overwrite files that are different

So, I'm making an updater for my game using wget. The latest version of the game (with all it's files), is on my server. The thing is that I want wget to download only the files that are different from a directory on the server into the www folder in the root of the game files (This has to be recursive, since not all of the game's files are stored directly in that folder). So, when the command is being ran it should check to see if the file's hashsum (if possible, otherwise it should check the size) on the server matches the one in the game's files. If it doesn't, it should download the file from the server and replace the one in the game's directory. This way, the player won't have to re-download all of the game's files.
Here's the command I used for testing:
wget.exe -N -r ftp://10.42.0.1/gamupd/arpg -O ./www
The server is running on my local network, so I use that IP address.
The thing is that it doesn't save the contents of /gamupd/arpg to the www folder, instead it seems to copy the directory tree of arpg.
Maybe the timestamping flag will satisfy you. From wget -help:
-N, --timestamping don't re-retrieve files unless newer than
local

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

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.