LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do i move hidden files (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-move-hidden-files-188367/)

coolinuxguy246 06-01-2004 05:46 AM

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.

bahramH 06-01-2004 06:00 AM

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"

bruno buys 06-01-2004 09:46 AM

In your file manager, look for the option "Show hidden files" and enable it.

eeried 06-02-2004 04:32 AM

And how to display hidden files on a terminal?

Thanks :)

muxman 06-02-2004 05:34 AM

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.

whansard 06-02-2004 06:07 AM

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 {} \;

coolinuxguy246 06-03-2004 01:33 AM

thanx a lot for that guys


All times are GMT -5. The time now is 10:18 AM.