You can use crontab
Edit crontab:
$ sudo crontab -e
The first time it will ask you which editor you wish to edit with.
Once in the editor add the following line:
@reboot /usr/local/bin/forever start /your/path/to/your/app.js
Save the file.
Reboot.
There is a common misconception among GNU/Linux users that our systems never ever need to be defragmented. This stems from the success of the journalized filesystems used by most distributions including EXT2,3 and 4, JFS, ZFS, XFS, ReiserFS and BTRFS. All of these boast smart ways and techniques in regards to the files allocation in the disks, minimizing the fragmentation problem to a point that there is practically no reason to defrag even after many years of installing and uninstalling applications and libraries in the same system. Fragmentation though can still be an issue though, especially for users that use space limited disks that may not offer many file allocation options.
The e4defrag program is part of the e2fsprogs package which should already be installed on your computer. In case the program is missing, install it with this command on Ubuntu:
sudo apt-get install e2fsprogs
To do this I use the following command, followed by the location and name of the file:
sudo e4defrag <file_name>
This is good when you have to defrag just a couple of files, but if you want to defrag your whole system then you should first unmount all partitions and run the following command:
sudo e4defrag /dev/*
If you want to perform defrag without unmounting, this would be a safe choice.:
sudo e4defrag /
Since many users nowadays use SSDs and not HDDs, it is important to note that the defragmentation procedure is only beneficial for the later. If you own an SSD, there is simply no point in worrying about fragmented files as those disks can access their storage randomly, wheres HDDs access sequentially. Defragging your SSD will only increase the read/write count and thus reduce the lifetime of your disk. SSD owners should convey their interest on the TRIM function instead, which is not covered in this tutorial.
biggest = Math.max.apply(Math, data.map(function(o) {
return o.biggest;
}));
Install nfs-kernel-server
Install nfs-kernel-server
and nfs-common Install nfs-common on the computer that has the files to be shared. These can be installed in the Software Center, or however you prefer to install packages. You can install them on the command-line with:
sudo apt-get update && sudo apt-get install nfs-kernel-server nfs-common
You need to edit the exports file that shows what to share and with whom. So run:
gksu gedit /etc/exports
For example, to give full read and write permissions, allowing any computer from 192.168.1.1 through 192.168.1.255, add this line to /etc/exports
:
/directory_to_share 192.168.1.1/24(rw,no_root_squash,async)
Restart the NFS server by running:
sudo /etc/init.d/nfs-kernel-server restart
(Or just reboot the computer.)
From now on after editing the /etc/exports
file, you can just run sudo exportfs -a
to apply the changes.
The showmount
cmommand will show you all available shares, if all went well.
An fstab
entry must be added to have your computers nfs-client
mount another computers exports @ boot time. gksu gedit /etc/fstab
will edit the required file.
192.168.0.200:/srv/nfs /media nfs rsize=8192 and wsize=8192,noexec,nosuid
Reboot and the share is mounted in /media
.
Set up a server on the client and client on the server for two-way shares.
You can print to a shared printer with CUPS (as mentioned in this answer
).
..article from askubuntu