<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://wiki.bores.fr/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://wiki.bores.fr/feed.php">
        <title>My technical notes computer_science:software:linux:commands</title>
        <description></description>
        <link>http://wiki.bores.fr/</link>
        <image rdf:resource="http://wiki.bores.fr/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-04-17T20:45:49+0200</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:archive_all_files_in_a_directory&amp;rev=1483560750&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:cloning_a_hard_drive&amp;rev=1426153061&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:crypt_a_hard_drive_using_cryptsetup&amp;rev=1426153111&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:delete_all_files_with_the_same_name_pattern_in_a_directory_and_its_subdirectories&amp;rev=1426153151&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_cpu_information&amp;rev=1426153048&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_only_the_line_n_of_a_text_file&amp;rev=1426153178&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_the_n_first_lines_of_a_text_file&amp;rev=1426153165&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:mount_.img_file&amp;rev=1426153096&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:play_mp3_from_the_command_line&amp;rev=1426153206&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remount_a_partition_in_rw_mode_fstab_recovering&amp;rev=1426153082&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remove_all_lines_of_a_text_file_except_the_ones_containing_a_keyword&amp;rev=1426153194&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remove_splashscreen_at_the_start_of_the_os&amp;rev=1426153140&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:truecrypt&amp;rev=1426153125&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://wiki.bores.fr/lib/tpl/dokuwiki/images/favicon.ico">
        <title>My technical notes</title>
        <link>http://wiki.bores.fr/</link>
        <url>http://wiki.bores.fr/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:archive_all_files_in_a_directory&amp;rev=1483560750&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-04T21:12:30+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:archive_all_files_in_a_directory</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:archive_all_files_in_a_directory&amp;rev=1483560750&amp;do=diff</link>
        <description>Creating archives

Using zip

Use -e for encryption
Use from -0 (none, archive only) to -9 (max) to set compression level


zip /home/&lt;my_user&gt;/&lt;my_archive_name&gt;.zip -r /folder/to/archive -e -9


Using 7zip

First verify that 7zip is installed


sudo apt-get install p7zip-full</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:cloning_a_hard_drive&amp;rev=1426153061&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:37:41+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:cloning_a_hard_drive</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:cloning_a_hard_drive&amp;rev=1426153061&amp;do=diff</link>
        <description>Cloning a Hard Drive

The below command make a bit to bit copy of your hardriwe

sudo dd if=/dev/sda of=/dev/sdb conv=sync,noerror

With:

	*  /dev/sda is the input(source drive)
	*  /dev/sdb is the output(target drive)
	*  sync,noerror must be used in combination, so dd will not stop if it encounter an error by reading the input.</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:crypt_a_hard_drive_using_cryptsetup&amp;rev=1426153111&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:38:31+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:crypt_a_hard_drive_using_cryptsetup</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:crypt_a_hard_drive_using_cryptsetup&amp;rev=1426153111&amp;do=diff</link>
        <description>Crypt a hard drive using Cryptsetup

Log as root and install cryptsetup


thomas@pavillon-t546fr:~$ sudo -s
root@pavillon-t546fr:~# apt-get install cryptsetup


Load the needed Kernel modules using modprobe


root@pavillon-t546fr:~# modprobe dm_crypt
root@pavillon-t546fr:~# modprobe dm_mod</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:delete_all_files_with_the_same_name_pattern_in_a_directory_and_its_subdirectories&amp;rev=1426153151&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:39:11+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:delete_all_files_with_the_same_name_pattern_in_a_directory_and_its_subdirectories</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:delete_all_files_with_the_same_name_pattern_in_a_directory_and_its_subdirectories&amp;rev=1426153151&amp;do=diff</link>
        <description>First use the command find to find all the files with a specific pattern.
The -print0 options is useful for xargs. -print0 seperates each result of find with a 0 character.

Then pipe the content of find to xargs. Use the -0 option of xargs, if your paths contain spaces characters.</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_cpu_information&amp;rev=1426153048&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:37:28+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:display_cpu_information</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_cpu_information&amp;rev=1426153048&amp;do=diff</link>
        <description>GNU/Linux, commands for reading cpu information

cpuinfo


thomas@thomas-1005PE:~$ cat /proc/cpuinfo


Output:


processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 28
model name	: Intel(R) Atom(TM) CPU N450   @ 1.66GHz
stepping	: 10
microcode	: 0x107
cpu MHz		: 1000.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: …</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_only_the_line_n_of_a_text_file&amp;rev=1426153178&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:39:38+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:display_only_the_line_n_of_a_text_file</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_only_the_line_n_of_a_text_file&amp;rev=1426153178&amp;do=diff</link>
        <description>With X the number of the line to be displayed


sed -n 'Xp' file.txt


Display the 10th line of a text file:


sed -n '10p' file.txt</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_the_n_first_lines_of_a_text_file&amp;rev=1426153165&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:39:25+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:display_the_n_first_lines_of_a_text_file</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:display_the_n_first_lines_of_a_text_file&amp;rev=1426153165&amp;do=diff</link>
        <description>head -n file.txt


Display only the first line of a text file:


head -1 file.txt


Display the 3 first lines of a text file:


head -3 file.txt</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:mount_.img_file&amp;rev=1426153096&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:38:16+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:mount_.img_file</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:mount_.img_file&amp;rev=1426153096&amp;do=diff</link>
        <description>.img files are not images of a partition, but of a whole disk. That means they start with a bootloader and a partition table. First, you have to find out the offset of the partition and mount it with the offset option of mount.

fdisk -l /path/to/image</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:play_mp3_from_the_command_line&amp;rev=1426153206&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:40:06+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:play_mp3_from_the_command_line</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:play_mp3_from_the_command_line&amp;rev=1426153206&amp;do=diff</link>
        <description>Play MP3 from the command line

My favorite software is mpg123 because it is simple and doens't need a lot of resources.
Start it with the -C parameter, so you will be able to enter command during the play.


mpg123 -C /path/to/your/mp3/album/*


Type h during the play to display the available commands.</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remount_a_partition_in_rw_mode_fstab_recovering&amp;rev=1426153082&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:38:02+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:remount_a_partition_in_rw_mode_fstab_recovering</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remount_a_partition_in_rw_mode_fstab_recovering&amp;rev=1426153082&amp;do=diff</link>
        <description>Remount a partition in rw mode

When you start Ubuntu in recovery mode, the system partition is mounted in read only mode.
If you have an error in your /etc/fstab, you aren't able to modify it.
The solution is to remount the system partition in read-write mode.</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remove_all_lines_of_a_text_file_except_the_ones_containing_a_keyword&amp;rev=1426153194&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:39:54+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:remove_all_lines_of_a_text_file_except_the_ones_containing_a_keyword</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remove_all_lines_of_a_text_file_except_the_ones_containing_a_keyword&amp;rev=1426153194&amp;do=diff</link>
        <description>Delete all lines except the ones containing the word 'word' in the file 'filename'


sed '/word/!d' filename.txt


Delete all lines except the ones containing the word 'word' or the word 'word2' in the file filename


sed '/word\|word2/!d' filename.txt</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remove_splashscreen_at_the_start_of_the_os&amp;rev=1426153140&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:39:00+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:remove_splashscreen_at_the_start_of_the_os</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:remove_splashscreen_at_the_start_of_the_os&amp;rev=1426153140&amp;do=diff</link>
        <description>Disabling Boot splashscreen

This option is particularly useful to see the bootsequence or to enter the password of an encrypted harddrive during the boot process.
Edit the /etc/default/grub file:


sudo vi /etc/dafault/grub


And change the value “</description>
    </item>
    <item rdf:about="http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:truecrypt&amp;rev=1426153125&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-12T10:38:45+0200</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>computer_science:software:linux:commands:truecrypt</title>
        <link>http://wiki.bores.fr/doku.php?id=computer_science:software:linux:commands:truecrypt&amp;rev=1426153125&amp;do=diff</link>
        <description>Useful truecrypt commands

Opening a truecrypt volume that doen't have yet a filesystem


truecrypt --filesystem=none /dev/sdg


The truecrypt volume is then opened in /dev/mapper/truecrypt1

Once the volume is opened it is possible to format it:


sudo mkfs.ntfs /dev/mapper/truecrypt1</description>
    </item>
</rdf:RDF>
