-
libx264-123 -
ffmpeg
ffmpeg32 -i out.mp3 -metadata title="The Title You Want" -metadata artist="" -metadata album="Name of the Album" out2.mp3wget -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_PATHdiretórios padrão para procurar as bibliotecas; -
/etc/ld.so.cachecache de bibliotecas -
/etc/ld.so.confadicionar novas entradas ao cache -
ldconfigcomando para atualizar e recarregar o arquivo /etc/ld.so.cache -
ldconfig -plista 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 -rDá 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 ongrep --color -E 'padrao|$' arquivo.txtdpkg --get-selections | grep -v deinstallps 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.txtwhile read line
do
echo -e "$line\ n"
done < file.txt
xset dpms force offnmcli dev wifi|grep yes| cut -d\' -f2xxd fileod 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
-lsqlite3startxecho "oi" >> /proc/28689/fdxxd -p filehttps://www.kernel.org/doc/Documentation/input/
PS.: Dá pra fazer coisas do tipo para ver as entradas:
cat /deb/input/mouse0`
xdotoolxdotool mousemove x y