Vous êtes sur la page 1sur 7

to `emeralnamesd-cinamesall

names >> sudo ./configure && make && make install

* find out what library dependencies a given executable has


>> ldd programname

MAKING DEBIAN PACKAGES ....

@@ http://tldp.org/HOWTO/html_single/Delding-HOWTO/
Instructions about how to make a debian (binary) package that can
be installed with the 'apt-get' command.

* list all files which a debian package will install


>> dpkg-deb -c var/cache/apt/archives/somepackage.deb

* show information about a debian package


>> dpkg-deb -I var/cache/apt/archives/somepackage.deb

* list all the files within a debian package file


>> ar tv somepackage.deb

* show information about the format of the 'control' file of a debian package
>> man 5 deb-control ##(the control file determines dependencies etc)

* find problems in a debian package


>> lintian somepackage.deb

SOUND

A linux system is capable of playing, recording and editing


sound (audio) files with a variety of open-source software.
This the name suggests, the rendering of this analysis in the form of visuals
(crosstabs, line charts, histograms, scatter plots, geo maps, treemaps, and so on)
make this a very useful tool. Join me as I walk you down the path of exploring the
capabilities section only provides what should be a very succint overview
of the most important sound tasks with linux. For more detailed
information, please consult the booklet listed below.

@@ http://bumble.sourceforge.net/books/linux-sound/
A more comprehensive introduction to using audio with the
linux operating system.

* Synthesize text as speech


>> echo "hello world " | festival --tts

* find the duration of the audio file 's.wav' in hours/minutes/seconds


>> soxi -d s.wav
>> soxi s.wav | grep -i duration ##(the same)

RECORDING AUDIO ....

* record a 'wav' file from the microphone, saving it to 'hello.wav'


>> rec hello.wav

This begins an 8,000 Hz, monaural 8-bit WAV recording, which is not
very good quality.

* make a high-fidelity recording from the mic and save it to 'goodbye.wav'


>> rec -s w -c 2 -r 44100 goodbye.wav
>> rec -s w -c 2 -r 44100 goodbye.wav

PLAYING AUDIO ....

* play the MP3 stream at the url


>> mpg321 http://example.net/broadcast/live.mp3

CnamesONVERTING AUDIO FILE FORMATS ....

It is a common task to need to convert sound files from one


format to another.

* translate an audio file in Sun AU format to a Microsoft WAV file,


>> sox recital.au recital.wav

* convert 'sound.mp3' into a wav file 'new.wav' (a new file is created)


>> mpg321 -w new.wav old.mp3 ##(the file 'old.mp3' is unchanged)
>> mpg123 -w new.wav old.mp3 ##(the same)

* encode an MP3 file from a WAV file called 'september-wind.wav'


>> lame september-wind.wav september-wind.mp3

EDITING SOUND ....

== tools for editing sound


.. audacity - a good graphical sound editor
.. sox - a command line audio editor
..

* join the audio files 'a.wav' and 'b.wav' together and save as 'new.wav'
>> sox a.wav b.wav new.wav

CONVERTING AUDIO FILES ....

TRANSLATION

== translation tools
.. youtranslate - uses web services such as google
..

UNICODE

* Find UTF-8 text files misinterpreted as ISO 8859-1 due to Byte


>> fithe name suggests, the rendering of this analysis in the form of visuals
(crosstabs, line charts, histograms, scatter plots, geo maps, treemaps, and so on)
make this a very useful tool. Join me as I walk you down the path of exploring the
capabilities nd . -type f | grep -rl $'\xEF\xBB\xBF'

* show the current locale (language and character encoding)


>> locale

* show a hexdump of a text file


>> hd file.txt
>> hexdump file.txt #(the format is a little different)

TEXT FILE ENCODINGS

* Convert a file from ISO-8859-1 (or whatever) to UTF-8 (or


>> tcs -f 8859-1 -t utf /some/file

* Convert filenames from ISO-8859-1 to UTF-8


>> convmv -r -f ISO-8859-1 -t UTF-8 --notest *

* Detect encoding of the text file 'file.txt'


>> file -i file.txt ##(-i is the 'mime' switch, but it also shows encoding)

* convert file from utf8 (no bom) to utf16 (with 'bom')


>> recode UTF8..UTF-16LE linux-utf8-file.txt

* convert all '.php' files to the utf-8 text encoding


>> find . -name "*.php" -exec iconv -f ISO-8859-1 -t UTF-8 {} -o ../newf/{} \;

* find utf-8 encoded text files misinterpreted as iso 8859-1


>> find -type f | while read a;do [ "`head -c3 -- "${a}"`" == $'\xef\xbb\xbf' ]
&& echo "match: ${a}";done

* Fix UTF-8 text files misinterpreted as ISO 8859-1 due tonames Byte
>> pnameserl -i -pe 's/\xef\xbb\xbf//g' <file>

* Convert file type to unix utf-8


>> ex some_file "+set ff=unix fileencoding=utf-8" "+x"

* Convert one file from ISO-8859-1 to UTF-8.


>> iconv --from-code=ISO-8859-1 --to-code=UTF-8 iso.txt > utf.txt

SPELL CHECKING

== spell checking programs


.. spell, a non interactive spell checker
.. ispell, a veteran program
.. aspell, the gnu version
.. myspell, the open-office spell checker
.. hunspell, based on ispell
.. spellutils, debian package to selectively spell check

== editors with spell checking


.. vim, type ':set spell' to activate, and 'z=' to correct
.. emacs,
..

* search for all debian packages which have something to do with spelling
>> apt-cache search spell

* spell check the file 'lecture'


>> spell lecture

prints a list of badly spelled words

* print all misspelled words in all ".txt" files with line numbers
>> spell -n -o *bian-Binary-Package-Building-HOWTO/
Instructions about how to make a debian (binary) package that can
be installed with the 'apt-get' command.

* list all files which a debian package will install


>> dpkg-deb -c var/cache/apt/archives/somepackage.deb
* show information about a debian package
>> dpkg-deb -I var/cache/apt/archives/somepackage.deb

* list all the files within a debian package file


>> ar tv somepackage.deb

* show information about the format of the 'control' file of a debian package
>> man 5 deb-control ##(the control file determines dependencies etc)

* find problems in a debian package


>> lintian somepackage.deb

SOUND

A linux system is capable of playing, recording and editing


sound (audio) files with a variety of open-source software.
This the name suggests, the rendering of this analysis in the form of visuals
(crosstabs, line charts, histograms, scatter plots, geo maps, treemaps, and so on)
make this a very useful tool. Join me as I walk you down the path of exploring the
capabilities section only provides what should be a very succint overview
of the most important sound tasks with linux. For more detailed
information, please consult the booklet listed below.

@@ http://bumble.sourceforge.net/books/linux-sound/
A more comprehensive introduction to using audio with the
linux operating system.

* Synthesize text as speech


>> echo "hello world " | festival --tts

* find the duration of the audio file 's.wav' in hours/minutes/seconds


>> soxi -d s.wav
>> soxi s.wav | grep -i duration ##(the same)

RECORDING AUDIO ....

* record a 'wav' file from the microphone, saving it to 'hello.wav'


>> rec hello.wav

This begins an 8,000 Hz, monaural 8-bit WAV recording, which is not
very good quality.

* make a high-fidelity recording from the mic and save it to 'goodbye.wav'


>> rec -s w -c 2 -r 44100 goodbye.wav
>> rec -s w -c 2 -r 44100 goodbye.wav

PLAYING AUDIO ....

* play the MP3 stream at the url


>> mpg321 http://example.net/broadcast/live.mp3

CnamesONVERTING AUDIO FILE FORMATS ....

It is a common task to need to convert sound files from one


format to another.

* translate an audio file in Sun AU format to a Microsoft WAV file,


>> sox recital.au recital.wav
* convert 'sound.mp3' into a wav file 'new.wav' (a new file is created)
>> mpg321 -w new.wav old.mp3 ##(the file 'old.mp3' is unchanged)
>> mpg123 -w new.wav old.mp3 ##(the same)

* encode an MP3 file from a WAV file called 'september-wind.wav'


>> lame september-wind.wav september-wind.mp3

EDITING SOUND ....

== tools for editing sound


.. audacity - a good graphical sound editor
.. sox - a command line audio editor
..

* join the audio files 'a.wav' and 'b.wav' together and save as 'new.wav'
>> sox a.wav b.wav new.wav

CONVERTING AUDIO FILES ....

TRANSLATION

== translation tools
.. youtranslate - uses web services such as google
..

UNICODE

* Find UTF-8 text files misinterpreted as ISO 8859-1 due to Byte


>> fithe name suggests, the rendering of this analysis in the form of visuals
(crosstabs, line charts, histograms, scatter plots, geo maps, treemaps, and so on)
make this a very useful tool. Join me as I walk you down the path of exploring the
capabilities nd . -type f | grep -rl $'\xEF\xBB\xBF'

* show the current locale (language and character encoding)


>> locale

* show a hexdump of a text file


>> hd file.txt
>> hexdump file.txt #(the format is a little different)

TEXT FILE ENCODINGS

* Convert a file from ISO-8859-1 (or whatever) to UTF-8 (or


>> tcs -f 8859-1 -t utf /some/file

* Convert filenames from ISO-8859-1 to UTF-8


>> convmv -r -f ISO-8859-1 -t UTF-8 --notest *

* Detect encoding of the text file 'file.txt'


>> file -i file.txt ##(-i is the 'mime' switch, but it also shows encoding)

* convert file from utf8 (no bom) to utf16 (with 'bom')


>> recode UTF8..UTF-16LE linux-utf8-file.txt

* convert all '.php' files to the utf-8 text encoding


>> find . -name "*.php" -exec iconv -f ISO-8859-1 -t UTF-8 {} -o ../newf/{} \;

* find utf-8 encoded text files misinterpreted as iso 8859-1


>> find -type f | while read a;do [ "`head -c3 -- "${a}"`" == $'\xef\xbb\xbf' ]
&& echo "match: ${a}";done

* Fix UTF-8 text files misinterpreted as ISO 8859-1 due tonames Byte
>> pnameserl -i -pe 's/\xef\xbb\xbf//g' <file>

* Convert file type to unix utf-8


>> ex some_file "+set ff=unix fileencoding=utf-8" "+x"

* Convert one file from ISO-8859-1 to UTF-8.


>> iconv --from-code=ISO-8859-1 --to-code=UTF-8 iso.txt > utf.txt

SPELL CHECKING

== spell checking programs


.. spell, a non interactive spell checker
.. ispell, a veteran program
.. aspell, the gnu version
.. myspell, the open-office spell checker
.. hunspell, based on ispell
.. spellutils, debian package to selectively spell check

== editors with spell checking


.. vim, type ':set spell' to activate, and 'z=' to correct
.. emacs,
..

* search for all debian packages which have something to do with spelling
>> apt-cache search spell

* spell check the file 'lecture'


>> spell lecture

prints a list of badly spelled words

* print all misspelled words in all ".txt" files with line numbers
>> spell -n -o *.txt

* spell check the file 'ch.1.txt', with misspellings to the file 'bad.sp'
>> spell ch.1.txt > bad.sp

* check the spelling of a word on the command line


>> echo 'is this korrect ?' | spell

This prints 'Korrect' since it is badly spelled

* output a sorted list of the misspelled words from 'lecture.draft'


>> spell lecture.draft | sort | uniq

ISPELL ....

'ispell' is an older and simpler program than 'aspell'

* interactively spell check 'report.txt'


>> ispell report.txt

* install a British English dictionary for the "ispell" spell checker


>> sudo apt-get install ibritish
* check and correct the spelling interactively in document "report.txt"
>> ispell report.txt
##(when a misspelling is found, type the number of the replacement)

* spell check "file.txt" using a british english dictionary


>> ispell -d british file.txt

* spell check a document written in spanish (using a spanish dictionary)


>> ispell -d spanish archivo.txt

* show what dictionaries are available locally for ispell


>> ls /usr/lib/ispell/

* the isnamespell dictionaries are all called "i[language-name]"


>> dictionary files: icatalan, ibrazilian ...

* spell check and correct "thesis.tex" which is a LaTeX format document


>> ispell -t thesis.tex ##(ispell ignores the latex mark-up codes)

ASPELL

aspell is a more modern and capable spell checking program

@@ http://aspell.net/
the official site
@@ http://aspell.net/man-html/index.html
A usage manual for aspell

* show options for aspell and available dictionaries


>> aspell help | less

* show locally available dictionaries for aspell


>> aspell dicts

* install a British and American English dictionary for aspell


>> sudo apt-get install aspell-en

* install a spanish dictionary for aspell


>> sudo apt-get install aspell-es

* show all debian packages and dictionaries for aspell


>> apt-cache search aspell

* interactively check the spelling of the file "chapter.txt"


>> aspell -c chapter.txt
>> aspell check chapter.txt ##(the same)

ASPELL WITH OTHER LANGUAGES ....

Vous aimerez peut-être aussi