Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-01-2004, 06:46 AM   #1
LQ Newbie
Registered: Apr 2004
Location: Victoria, Australia
Distribution: fedora
Posts: 29

Rep: Reputation: 15
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.
Old 06-01-2004, 07:00 AM   #2
Registered: Apr 2004
Location: France
Distribution: Mandrake
Posts: 67

Rep: Reputation: 15
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"
Old 06-01-2004, 10:46 AM   #3
bruno buys
Senior Member
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
In your file manager, look for the option "Show hidden files" and enable it.
Old 06-02-2004, 05:32 AM   #4
Registered: Jan 2004
Distribution: Xubuntu Dapper - Debian Etch - Puppy Linux
Posts: 136

Rep: Reputation: 15
And how to display hidden files on a terminal?

Old 06-02-2004, 06:34 AM   #5
Registered: Apr 2004
Distribution: Debian
Posts: 203

Rep: Reputation: 32
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.
Old 06-02-2004, 07:07 AM   #6
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
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 {} \;

Last edited by whansard; 06-02-2004 at 07:08 AM.
Old 06-03-2004, 02:33 AM   #7
LQ Newbie
Registered: Apr 2004
Location: Victoria, Australia
Distribution: fedora
Posts: 29

Original Poster
Rep: Reputation: 15
thanx a lot for that guys


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot using FTP move command to move files adrianmak Linux - Networking 4 04-21-2009 01:01 PM
hidden files Jeebizz Slackware 4 04-22-2005 08:18 PM
home directory files gone, hidden files remain Grasshopper Linux - Security 12 04-10-2005 09:23 PM
hidden files Alwyn Linux - Newbie 2 01-27-2005 01:20 AM
M$ CD w/ Hidden files???? trey85stang Linux - Newbie 3 05-04-2004 10:00 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration