They both work, however the second one is simpler and all fits on one
line. The << eof method is best used when you have multiple lines you
want to add to a file or when you have a bunch of characters what you
would otherwise need to escape.
Brian Cluff
On 01/05/2016 12:03 PM, Michael Havens wrote:
so my other command:
#adjust where pictures are stored
sudo cat >> /etc/fstab << eof
/media/bmike1/entertainment/Pictures /home/bmike1/Pictures none bind 0 0
eof
should be:
echo /media/bmike1/entertainment/Pictures /home/bmike1/Pictures none
bind 0 0 >>/etc/fstab
????
On Tue, Jan 5, 2016 at 1:55 PM, Brian Cluff <[email protected]
<mailto:[email protected]>> wrote:
You are trying to write "vm.swappiness=10" directly to the
swappiness settings.
If that is what you are trying to do, do it like this:
echo 10 >/proc/sys/vm/swappiness
I suspect that what you really want to do is write it to a config
file so that it is automatically set every time you boot. In that
case do:
echo vm.swappiness=10 >/etc/sysctl.d/99-swappiness.conf
sysctl -p /etc/sysctl.d/99-swappiness.conf
The last line just loads the settings, you could also just reboot.
Brian Cluff
On 01/05/2016 11:26 AM, Michael Havens wrote:
I have a small copy n paste txt file for when my hard drive fails
(hopefully in the distant future) so I can get my new hard drive
up and running again as closely similar to the previous drive as
possible.
I made the one command up myself and just discovered it does not
work. That command is:
# Reduce the swap tendency
cat >> /proc/sys/vm/swappiness <<eof
> vm.swappiness=10
eof
with the error of:
cat: write error: Invalid argument
I have a similar
sudo cat >> /etc/fstab << eof
/media/bmike1/entertainment/Pictures /home/bmike1/Pictures none
bind 0 0
eof
which I do not believe was implemented correctly as when I
inspect 'mount' there does not appear to be the entertainment
directory or pictures directories listed anywhere. So I suppose
it is wrong then....
--
:-)~MIKE~(-:
---------------------------------------------------
PLUG-discuss mailing list [email protected]
<mailto:[email protected]>
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - [email protected]
<mailto:[email protected]>
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss
--
:-)~MIKE~(-:
---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss