_                    _
  ___ | |__   __ _ _______ | |_
 / _ \| '_ \ / _` |_  / _ \| __|
| (_) | | | | (_| |/ / (_) | |_
 \___/|_| |_|\__,_/___\___/ \__|

command_linetools and tips

df -h [PATH]

-h | human readable size output.
-a | display all files and directories.
-d [N] | max recursion depth.
-s | summarize, display only the total.
$ du -had1 [PATH]
$ du -hs [PATH]

Copy files with full path

cp --parents

(back to top)

Create multiple directories : mkdir {dir1,dir2,dir3}
Create nested directories : mkdir -p dir1/dir2
Create multiple nested directories : mkdir -p main_dir/{dir1,dir2,dir3}

(back to top)

Move file or directory : mv SOURCE TARGET
Copy file : cp SOURCE TARGET
Copy direcotry : cp -r SOURCE TARGET
Remove file : rm FILENAME
Remove directory : rm -r DIRECTORY
The flag -R/-r applies to different commands to execute recursive actions.

(back to top)

Command output can be redirected to other commands using | .

-n : Maximum number of arguments.
-0 : User NUL as separator instead of the default space and newlines.
$ echo -e "1\n2\n3" | xargs -n1 echo
1
2
3
$ echo -e "1\n2\n3" | xargs echo
1 2 3
$ echo -e "1\n2\n3" | xargs -0 echo
1
2
3

$ echo "1 2 3" | xargs echo
1 2 3
$ echo "1 2 3" | xargs -n1 echo
1
2
3

(back to top)

Concatenate images : convert +append INPUT_FILES OUTPUT_FILE
Lower the quality to reduce file size : convert -quality 50 INPUT_FILE(S) OUTPUT_FILE

(back to top)

- Translate to Spanish.

(back to top)

command_line_intro, wget, lynx, user_management, tor, sort, network, comparison, text_processing, bash, linux
VoidLinux manpages: cp(1), mkdir(1), df(1), du(1), magick(1), mv(1), rm(1), xargs(1)

(back to top)

2026-06-02 : Merged command_line_intro.
: Moved sort, network, comparison into its own files.
2026-05-10 : added ImageMagick concatenation and quality.
2025-11-24 : Created

(back to top)

ohazot | about | ohazot.com <admin@ohazot.com>

This document applies to: linux , OpenBSD 7.8 | 2026-06-02