Useful Commands/Low Level IO: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
(Created page with "= File System = {| class="wikitable" ! Purpose || Command |- | list with color and suffix for dir and link | <syntaxhighlight lang="bash">ls -FG</syntaxhighlight> |- | list add hidden files only '''single quote is necessary''' | <syntaxhighlight lang="bash">find . -name '.*'</syntaxhighlight> |- | delete dist directory recursively except README.md and itself. | <syntaxhighlight lang="bash"> find ../../assets/swagger/support ! -path *swagger/support ! -name 'README.md' -d...")
 
No edit summary
 
Line 1: Line 1:
= File System =
{| class="wikitable"
{| class="wikitable"
! Purpose || Command
! 🎯 Purpose || ⌨️ Command
|-
|-
| list with color and suffix for dir and link
| list with color and suffix for dir and link

Latest revision as of 02:00, 17 September 2026

🎯 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