Useful Commands
Jump to navigation
Jump to search
https://www.diskpart.com/articles/delete-hidden-partition-on-usb-drive-7201.html
Overview
| Services | Networking | OS | Hardware | Packages | File System | Data |
|---|---|---|---|---|---|---|
|
Trouble shooting
| Purpose | Command |
|---|---|
| Verify $PATH by line. |
echo $PATH | tr ':' '\n'
echo $PATH | tr ':' '\n' | grep 'snap'
|
File System
| Purpose | Command |
|---|---|
| list with color and suffix for dir and link | ls -FG
|
| list add hidden files only single quote is necessary | find . -name '.*'
|
| delete dist directory recursively except README.md and itself. | find ../../assets/swagger/support ! -path *swagger/support ! -name 'README.md' -delete
|
| delete files that filename leads by - or -- | rm -- -X --exclude-from
|
| Set file mtime 2013-09-01 00:00:00 |
touch -t 201309010000 FILENAME
|
| create ramdisk for Linux (cannot set size) | mount -t ramfs ramfs /usr/local/ramdisk
|
| create ramdisk for Linux/BSD | mount -t tmpfs -o size=128m tmpfs /usr/local/ramdisk
|
| Test I/O performance of 1G write with 4K block | dd if=/dev/zero of=100k.bin bs=4k count=262144
|
| Create file with 100K size | dd if=/dev/zero of=100k.bin bs=1k count=100
|
| Create file with 1M size No warning on disk full |
dd if=/dev/zero of=10m.bin bs=1m count=10
|
| Simulate memory consumption (RAM+SWAP) | mkdir /usr/local/ramdisk
mount -t tmpfs -o size=2G tmpfs /usr/local/ramdisk
dd if=/dev/zero of=/usr/local/ramdisk/fill.bin bs=1m count=2048
|