-
libx264-123
-
ffmpeg
ffmpeg32 -i out.mp3 -metadata title="The Title You Want" -metadata artist="" -metadata album="Name of the Album" out2.mp3
wget -r -P /save/location -A jpeg,jpg,bmp,gif,png http://www.domain.com
More information:
-r
enables recursive retrieval. See Recursive Downloadfor more information.
-P
sets the directory prefix where all files and directories are saved to.
-A
sets a whitelist for retrieving only certain file types. Strings and patterns are accepted, and both can be used in a comma separated list (as seen above). See Types of Files for more information.
lscpu
Lista as cpus disponíveis e suas características
lshal
Precisa ter HAL instalado (Hardware Abstraction Layer)
Lista todos os hardware visíveis pelo HAL
lshw
Disponível nas distribuições baseadas no Debian.
Usa entradas para detectar todo hardware: Kernel, HAL, DMI, etc.
‘-html’ gera relatórios
lspci
Comando padrão
Lista todo hardware que o kernel consegue detectar que esteja conectado a PCI
lsusb
Comando padrão
Lista todo hardware conectado às portas USB detectadas pelo kernel.
dmidecode
Comando padrão
Lista todo hardware reportador por interfaces DMI.
#Bibliotecas
-
ldd [executável]
Lista as depedências de bibliotecas do sistema do [executável]. -
ld.so
é o executável que garante os links dinâmicos do sistema; -
LD_LIBRARY_PATH
diretórios padrão para procurar as bibliotecas; -
/etc/ld.so.cache
cache de bibliotecas -
/etc/ld.so.conf
adicionar novas entradas ao cache -
ldconfig
comando para atualizar e recarregar o arquivo /etc/ld.so.cache -
ldconfig -p
lista todas as bibiotecas contidas no cache
#Lista todos os pacotes instalados (apt)
dpkg --get-selections | grep -v deinstall | awk '{ print $1 }'
It depends on what you want to do with the script (or any other program you want to run).
If you just want to run the script system is the easiest thing to do, but it does some other stuff too, including running a shell and having it run the command (/bin/sh under most *nix).
If you want to either feed the shell script via its standard input or consume its standard output you can use popen (and pclose) to set up a pipe. This also uses the shell (/bin/sh under most *nix) to run the command.
Both of these are library functions that do a lot under the hood, but if they don't meet your needs (or you just want to experiment and learn) you can also use system calls directly. This also allows you do avoid having the shell (/bin/sh) run your command for you.
The system calls of interest are fork, execve, and waitpid. You may want to use one of the library wrappers around execve (type man 3 exec for a list of them). You may also want to use one of the other wait functions (man 2 wait has them all). Additionally you may be interested in the system calls clone and vfork which are related to fork.
fork duplicates the current program, where the only main difference is that the new process gets 0 returned from the call to fork. The parent process gets the new process's process id (or an error) returned.
execve replaces the current program with a new program (keeping the same process id).
waitpid is used by a parent process to wait on a particular child process to finish.
Having the fork and execve steps separate allows programs to do some setup for the new process before it is created (without messing up itself). These include changing standard input, output, and stderr to be different files than the parent process used, changing the user or group of the process, closing files that the child won't need, changing the session, or changing the environmental variables.
You may also be interested in the pipe and dup2 system calls. pipe creates a pipe (with both an input and an output file descriptor). dup2 duplicates a file descriptor as a specific file descriptor (dup is similar but duplicates a file descriptor to the lowest available file descriptor).
fswebcam -r 640x480 --jpeg 85 -D 1 teste.jpg
iwgetid -r
Dá pra fazer altas trakinagens...
Dependendo do pacote vim que é instalado, a sintaxe não é ativada sempre, por padrão. Para fazer isso, vá no arquivo ~/.vimrc colocar a seguinte linha:
syntax on
grep --color -E 'padrao|$' arquivo.txt
dpkg --get-selections | grep -v deinstall
ps axco pid,command
{ find . -name "*.h" ; find . -name "*" | grep ".cpp"; }| xargs wc -l
#include <sys/time.h>
#include <iostream>
#include <unistd.h>
using namespace std;
int main()
{
struct timeval start, end;
long mtime, seconds, useconds;
gettimeofday(&start, NULL);
sleep(2);
gettimeofday(&end, NULL);
seconds = end.tv_sec - start.tv_sec;
useconds = end.tv_usec - start.tv_usec;
mtime = ((seconds) * 1000 + useconds/1000.0) + 0.5;
cout << "Elapsed time: " << mtime << " milliseconds" << endl;
return 0;
}
(Mesma coisa que o ctrl+c)
echo "oi" | xclip -selection clipboard
xclip -selection clipboard < arquivo.txt
while read line
do
echo -e "$line\ n"
done < file.txt
xset dpms force off
nmcli dev wifi|grep yes| cut -d\' -f2
xxd file
od file
dd if=<file.iso> of=<device> bs=4M ; sync
- Onde:
<file.iso>
: é a imagem do cd;
<device>
: é o dispositivo (geralmente /dev/sdx onde x pode ser b, c ....;
bs=4M
: cópia por blocos de 4M, para uma melhor performance;
sync
: O comando sync garante que o disco será escrito;
sudo apt-get install libsqlite3-dev
- Daí Pra compilar é só colocar o link
-lsqlite3
startx
echo "oi" >> /proc/28689/fd
xxd -p file
https://www.kernel.org/doc/Documentation/input/
PS.: Dá pra fazer coisas do tipo para ver as entradas:
cat /deb/input/mouse0
`
xdotool
xdotool mousemove x y