Skip to content

swivelmargarita/linux-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

QEMU notes

Table of Contents

[[TOC]]

Description

Sometimes remembering exact syntax or options of a command or tool. This is an effort to compile that information into central repository. For example:

  • You know that find can execute commmands on found files, but forgot the syntax?
    Was it -exec <command> {}; or -exec <command> {}\;?
    Was there a space?
  • Or that handy rsync option?
  • How did I suppose to redirect both output and error into?
    2&1> or 2>&1?

Find

Execute a command on found files

find . -type f -[i]name '*.txt' -exec grep -q 'hello' {} ';'

-type <letter>. letter can be:

  • b -> block
  • f -> regular file
  • d -> directory
  • l -> symbolic link

-name <pattern> -> file name(not directory) in shell patern format to match
-iname -> insensitive name

-exec <command> [{}] ';|+'

References

Pacman

Find files installed by a package

$ pacman -Ql pacman|grep /usr/bin/
pacman /usr/bin/makepkg
pacman /usr/bin/makepkg-template
pacman /usr/bin/pacman
pacman /usr/bin/pacman-conf
pacman /usr/bin/pacman-db-upgrade
pacman /usr/bin/pacman-key
pacman /usr/bin/repo-add
pacman /usr/bin/repo-elephant
pacman /usr/bin/repo-remove
pacman /usr/bin/testpkg
pacman /usr/bin/vercmp

Awk

Sed

Vim

Grep

Lxc

Docker

Ansible

Qemu

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published