Saturday, 7 July 2012

Terminal Stuff

ffmpeg -i input.mp4 -c:v copy -c:a copy output.mkv

ffmpeg takes an input file, copies the codec for video and audio and sets the output file and format


openssl enc -aes-256-cbc -salt -in file.tar.gz > outfile.tar.gz

openssl set to encryption mode with aes-256-cbc encryption algorithm and salted. Sets the input file and directs the output to a file


expand -t4 Tabs.java

expand sets a number of spaces to replace tabs with and an input file, outputs to stdout


find . -iname \*\.epub -exec mv {} ~/epub/ \;

finds files using the current directory as the root, filters on the case insensitive name a regex pattern of *.epub and for each find executes mv the result to ~/epub/


nmap -sTUV -O -p- -PN 192.168.1.*

nmap set to TCP and UDP and versioning mode, also set to identify an operating system. Will scan all ports and behave as if the host is up regardless of responses. Will scan a class C network for all ip's between 192.168.1.1-255


:%s/search_regex/replacement_text/g

Vim command for finding and replacing text, the G flag represents globally across the whole file. Otherwise it will be limited to the current line


No comments:

Post a Comment