An Otter Wiki
Attachments
History
Blame
Rename
Delete
Changelog
Documentation
Toggle dark mode
Login
Home
A - Z
Create page
Page Index
Docker commands
Git commands
Home
Linux commands
Markdown
An Otter Wiki
Linux Commands
9927ae
Commit
9927ae
2026-03-21 22:17:33
joris
: editen
linux commands.md
..
@@ 26,6 26,8 @@
> sudo chown -R syncthing:syncthing Muziek/
#### Change permissions CHMOD
+
chmod ...
+
Alle folders naar 770
> sudo find Muziek/ -type d -exec chmod 770 {} \;
Alle bestanden naar 660
@@ 34,29 36,34 @@
recursief verwijderen (niet lege) directories
>rm -R /path-to-dir
-
+
##### copy
You can copy the content of a folder /source to another existing folder /dest with the command
cp -a /source/. /dest/
The -a option is an improved recursive option, that preserve all file attributes, and also preserve symlinks.
The . at end of the source path is a specific cp syntax that allow to copy all files and folders, included hidden ones.
-
+
##### find
vinden bestand (recursief):
sudo find -iname “naam.bestand”
grootte directory
+
##### disk use
du -hs /dir
sudo du -hc --max-depth=1
+
+
##### mounten
usb stick mounten
sudo fdisk -l
sudo mkdir /mnt/usb-stick/
sudo mount /dev/sdb1 /mnt/usb-stick/
+
##### formateren
formateren
sudo umount /dev/sdb1
sudo mkfs.ext4 /dev/sdb1
+
#### rsync
backup met permissies:
sudo rsync -auvh --progress <sourceDir>/ <destDir>
sudo rsync -auh /mnt/usb-stick/ /home
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9