LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-22-2017, 08:41 AM   #1
fohnbit
LQ Newbie
 
Registered: Aug 2017
Posts: 15

Rep: Reputation: Disabled
Move folder to other location


Hello,

is it possible, for example, to move folder:
/var/log/

to the location
/media/card/log


So any programm which write to /var/log is now wrinting to /media/card/log

I know with mount I can mount a folder to a partition. But I need several different folder at /media/card which ist mounted from mmcblk0p1

Thank you!
 
Old 08-22-2017, 08:43 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: Currently OpenMandriva. Previously openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,420

Rep: Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769Reputation: 1769
Quote:
Originally Posted by fohnbit View Post
Hello,

is it possible, for example, to move folder:
/var/log/

to the location
/media/card/log


So any programm which write to /var/log is now wrinting to /media/card/log

I know with mount I can mount a folder to a partition. But I need several different folder at /media/card which ist mounted from mmcblk0p1

Thank you!
A better question, WHY?
 
Old 08-22-2017, 12:09 PM   #3
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
Open /etc/fstab in your text editor, and add this line:
Code:
/media/card/log  /var/log/  none bind
Save the file and exit the editor, then:
Code:
sudo mount -a
 
Old 08-22-2017, 03:49 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,423

Rep: Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998Reputation: 2998
I think there are many older and newer programs that will try to write to /var. Not sure you can change it on that side. You might be able to copy or move contents based on some script. An idea at this. https://unix.stackexchange.com/quest...rent-directory
 
  


Reply


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
[SOLVED] Trying to move a file from folder to folder in Ubuntu get a message: Permissio Denied AlexBB Linux - Newbie 13 12-09-2014 08:42 PM
How to automatically move files from one folder into another folder? xmrkite Linux - Software 6 11-05-2006 11:39 AM
i move my /etc folder in my /home folder Casanogab Linux - Newbie 8 03-31-2006 02:21 PM
Move Choices-Folder from rox to different location Fonk Linux - Software 1 04-16-2005 09:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:33 AM.

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