-
as seen on Server Fault
- Search for 'Server Fault'
Given the following situation...
<path>/mydir1/mydir2
...where mydir2 should have overwritten mydir1, but was instead placed inside, and both directories actually have the same filename. How is that fixed?
Attempting to do mv <path>/mydir/mydir/* <path>/mydir/ or mv <path>/mydir…
>>> More
-
as seen on Server Fault
- Search for 'Server Fault'
I may be going bonkers here, but I'm trying to move a directory to a new location, overwriting the contents (on Linux, using bash).
Everytime I try it, it responds with "mv: cannot move `./src' to a subdirectory of itself"
eg. I have:
/src
/new/dir/src
/$ mv src/ new/dir/
If I delete the destination…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
im using linux with gedit which has the wonderful habit of creating a temp file with a tilde at the end for every file I edit.
im trying to move all of these files at once to a different folder using the following:
find . -iname “*.php~” -exec mv {} /mydir \;
However, its now giving me syntax…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I am using the following script to search and replace the deprecated functions in a file with the newer ones.
5 for strFile in `ls deprecated_functions_search_and_replace.txt `
6 do
7 sed "s/ereg_replace[^\(]*(\([^,]*\),/preg_replace\1('#'.\2.'#',/g" $strFile > temp_file
8 …
>>> More
-
as seen on Server Fault
- Search for 'Server Fault'
I tried something on my vm ubuntu and managed to mess it up... luckily I made a snapshot not too long a go.
I renamed a file to ,,, and tried to mv ,,, *. The entire dir's content of the dir disappeared.
Can someone please explain to me what happened?
Thank you.
>>> More