how do i move hidden files
Hello everybody,
My problem is today I have decided to change the names of one of my users on my fedora core 1 system and its gone all wrong. I decided to create a new user and directory and move the old users files into the new directory and delete the old user. Only prob is it I don't know how to move all those hidden configuration files starting with '.' and I'm finding myself having to reconfigure all of the tweaking that I've done in the previous user. So does anyone have any suggestions as how to move hidden files. Thanks a lot for your time. |
One good way which works always is to use "tar" :
"tar cvf" to archive all your files from a given directory into a single one, and then "tar xvf" to extract them in a new directory (which can be on a different computer). Please, refer to "tar" man page. You will not miss anything, execpt maybe symbolic links (to check). An other one, less general, is to use "find" and its many options. There are probably others. I recommand "tar" |
In your file manager, look for the option "Show hidden files" and enable it.
|
And how to display hidden files on a terminal?
Thanks :) |
If you are root, go to the console in the old directory and then you use the command mv .* /home/newuser it will move those files from that directory to the new one.
Once there change the owner of the files, chown newuser:newgroup .* that will make them owned by the newuser. That should take care of it all, moving the files to the new directory and changing the owner to the new user. |
ls -al shows hidden files
tar clfv - .|(cd /newdirectory; tar xpf - --same-owner) copies all files from current directory and below to /newdirectory. if your owner name has changed, as root, go in /newdirectory and find -exec chown newowner {} \; |
thanx a lot for that guys
|
All times are GMT -5. The time now is 10:18 AM. |