File Management[edit]
To edit a text file (using vi)[edit]
For info on how to use vi see Basic commands for Linux vi Editor
vi /location_of_file/file_name
|
To go to a directory[edit]
Make a directory[edit]
List contents of Directory[edit]
Count the number of files in the current Directory and its sub-directories[edit]
Check size of Directory and sub-directories[edit]
Find a file[edit]
Delete a file[edit]
Delete a directory and its content[edit]
- Note: Use this command with great care
Move or Rename a file[edit]
mv /sourceDirectory/sourceFile /destination
|
Copy a file[edit]
cp /sourceDirectory/sourceFile /destination
|
Copy groups of files[edit]
cp /sourceDirectory/*.* /destination
|
Copy a directory and any sub directories[edit]
cp -r -p /sourceDirectory /destinationpath
|
Create a uncompressed tar (.tar) archive[edit]
To create a uncompressed (.tar) archive of all files directories and subdirectories in the current directory:
tar -cvf archivefilename.tar *
|
Create a compressed tar (.tgz) archive[edit]
To create a compressed (.tgz) archive of all files directories and subdirectories in the current directory:
tar -cvzf archivefilename.tgz *
|
Unpack .tar archives[edit]
For uncompressed .tar archives:
Unpack .tar.gz archives[edit]
For gzip compressed .tar.gz archives:
System Management[edit]
Reboot the Synology box[edit]
Shutdown the Synology box[edit]
Stop a process[edit]
Stop a program[edit]
Display most current processes running[edit]
Report disk space usage[edit]
Show all current processes[edit]
Show currently open ports and their status[edit]
Change Logged in user[edit]
If you are logged in as root you can open a new shell as if you just logged in as another user, substitute xxx with the user name. To return to root session use "exit"
Install a ipkg program package[edit]
Note: This assumes you have already installed ipkg itself.
Uninstall a ipkg program package[edit]
Restart Services[edit]
/usr/syno/etc/rc.d/S97apache-user.sh restart
|
appletalk[edit]
/usr/syno/etc/rc.d/S81atalk.sh restart
|
/usr/syno/etc/rc.d/S04crond.sh stop
/usr/syno/etc/rc.d/S04crond.sh start
|
/usr/syno/etc/rc.d/S99ftpd.sh restart
|
/usr/syno/etc/rc.d/S66synoindexd.sh restart
|
/usr/syno/etc/rc.d/S99itunes.sh restart
|
/usr/syno/etc/rc.d/S21mysql.sh restart
|
/usr/syno/etc/rc.d/S83nfsd.sh restart
|
postgresql[edit]
/usr/syno/etc/rc.d/S20pgsql.sh restart
|
/usr/syno/etc/rc.d/S80samba.sh restart
|
/usr/syno/etc.defaults/rc.d/S95sshd.sh restart
|
System Information[edit]
Check system memory info[edit]
Check CPU Info[edit]
Check Interrupts in use[edit]
Check File Systems in use[edit]
Comprehensive information on the file system format[edit]
Check Linux Version[edit]
Check RAID Devices[edit]
Check Enviroment Variables[edit]
Check what physical and logical disks/partitions you have[edit]
For multibay NASs and more info
cat /proc/diskstats
or for all NAS types
cat /proc/partitions
or for similar but different info
fdisk -l
|
Miscellaneous[edit]
Clear terminal screen[edit]