<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.plecko.hr/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="https://wiki.plecko.hr/feed.php">
        <title>Eureka Moment linux:shell_commands</title>
        <description></description>
        <link>https://wiki.plecko.hr/</link>
        <image rdf:resource="https://wiki.plecko.hr/lib/tpl/bootstrap3/images/favicon.ico" />
       <dc:date>2026-05-06T08:51:52+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:attitude&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:chmod_nummeric&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:chmod&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:copy_over_ssh&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:cp_recent_files&amp;rev=1599041940&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:du&amp;rev=1589543520&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:exec_only_on_set_of_objects&amp;rev=1615554708&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:fdisk&amp;rev=1744195364&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:line&amp;rev=1615548534&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:mount_image_file_on_ubuntu&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:numeric_permissions&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:rsync_backup&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:send_messages_to_users&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:start&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:string_search&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:tar&amp;rev=1572509100&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:up&amp;rev=1645166507&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:var_and_arr&amp;rev=1618833371&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.plecko.hr/lib/tpl/bootstrap3/images/favicon.ico">
        <title>Eureka Moment</title>
        <link>https://wiki.plecko.hr/</link>
        <url>https://wiki.plecko.hr/lib/tpl/bootstrap3/images/favicon.ico</url>
    </image>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:attitude&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:attitude</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:attitude&amp;rev=1572509100&amp;do=diff</link>
        <description>Give the Linux terminal an attitude

	*  Opan a terminal and Type “sudo visudo”.
	*  At the bottom of the “Defaults” (near the top of the file) add, on a new line, “Defaults insults”.
	*  Save the file.

“What did I just do to my computer?</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:chmod_nummeric&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:chmod_nummeric</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:chmod_nummeric&amp;rev=1572509100&amp;do=diff</link>
        <description>Display numeric permissions using ls

Create an alias for the LS command.

ls -l | awk '{k=0;for(i=0;i&lt;=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) *2^(8-i));if(k)printf(&quot;%0o &quot;,k);print}'

Output should be with the nummeric permissions at the beginning of each row:</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:chmod&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:chmod</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:chmod&amp;rev=1572509100&amp;do=diff</link>
        <description>CHMOD

chmod g+s /path/to/parent

Now, all new files and folder created under /path/to/parent will have the same group assigned as is set on /path/to/parent.</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:copy_over_ssh&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:copy_over_ssh</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:copy_over_ssh&amp;rev=1572509100&amp;do=diff</link>
        <description>Copying Files over SSH

$ scp user@remote.host:file.txt /some/local/directory

$ scp file.txt user@remote.host:/some/remote/directory

$ scp -r dir1 user@remote.host:/some/remote/directory/dir2

$ scp user@remote.host1:/directory/file.txt user@remote.host2:/some/directory/</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:cp_recent_files&amp;rev=1599041940&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-09-02T12:19:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:cp_recent_files</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:cp_recent_files&amp;rev=1599041940&amp;do=diff</link>
        <description>Copy files younger that 24 hrs

find . -mtime -1 -exec cp {} /tmp \;</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:du&amp;rev=1589543520&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-05-15T13:52:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:du</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:du&amp;rev=1589543520&amp;do=diff</link>
        <description>du examples

How to Find Biggest Files and Directories in Linux

# du -a /home | sort -n -r | head -n 5

Find Largest Directories in Linux

# du -a | sort -n -r | head -n 5
# du -hs * | sort -rh | head -5
# du -Sh | sort -rh | head -5

Find Out Top File Sizes Only</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:exec_only_on_set_of_objects&amp;rev=1615554708&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-03-12T14:11:48+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:exec_only_on_set_of_objects</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:exec_only_on_set_of_objects&amp;rev=1615554708&amp;do=diff</link>
        <description>Bash: Execute a command only on a set of objects

Apply sticky bit only on folders:

chmod g+s $(find . -type d)</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:fdisk&amp;rev=1744195364&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-04-09T12:42:44+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:fdisk</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:fdisk&amp;rev=1744195364&amp;do=diff</link>
        <description>Create partitions using CLI on linux

First and foremost:

!! WARNING !!

These commands are EXAMPLES. DELETING partitions, MODIFYING and FORMATTING filesystems destroys data and/or may prevent your machine from booting.  Make backups.  Use at own risk.   Try on a machine you don't mind losing all data on. caveat admin.</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:line&amp;rev=1615548534&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-03-12T12:28:54+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:line</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:line&amp;rev=1615548534&amp;do=diff</link>
        <description>Bash line shortcuts

Clear line

	*   - clear all the current line from the end to the beginning only if the cursor is at the end of the line.

You can then recall the cleared line with  if you need.

	*   - clear all the current line from the beginning to the end only if the cursor is at the beginning of the line.</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:mount_image_file_on_ubuntu&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:mount_image_file_on_ubuntu</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:mount_image_file_on_ubuntu&amp;rev=1572509100&amp;do=diff</link>
        <description>Mount image file on Ubuntu

mount -t udf filename.img ~/img -o loop</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:numeric_permissions&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:numeric_permissions</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:numeric_permissions&amp;rev=1572509100&amp;do=diff</link>
        <description>Show numeric permissions on ls

ls -l | awk '{k=0;for(i=0;i&lt;=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(&quot;%0o &quot;,k);print}'</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:rsync_backup&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:rsync_backup</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:rsync_backup&amp;rev=1572509100&amp;do=diff</link>
        <description>Rsync mirror folders

rsync -av --delete --log-file=/home/user/logs/backup_$(date +%Y%m%d).log /server/Pictures /raid/Pictures/

	*  /server/Pictures copies the Pictures folder
	*  /server/Pictures/ copies the contents od the Pictures folder

	*  /raid/Pictures/ copies into the Pictures folder</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:send_messages_to_users&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:send_messages_to_users</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:send_messages_to_users&amp;rev=1572509100&amp;do=diff</link>
        <description>Send messages to other users


# Findout who is logged on
$ who
su       pts/0        2019-05-14 08:15 (172.16.11.44)
jack     pts/1        2019-05-14 09:47 (172.16.11.44)


# Broadcast a message
$ wall &quot;System will go down in a minute!&quot;

Broadcast message from su@hweb (pts/0) (Tue May 14 09:48:18 2019):

System will go down in a minute!


# Broadcast a message, but do not display the banner (available only to root)
wall -n &quot;System will go down in a minute!&quot; 

System will go down in a minute!


…</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:start&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:start</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:start&amp;rev=1572509100&amp;do=diff</link>
        <description>Shell Commands




	* .bashrc up
	* Bash line shortcuts
	* Bash: Execute a command only on a set of objects
	* CHMOD
	* Copy files younger that 24 hrs
	* Copying Files over SSH
	* Create partitions using CLI on linux
	* Display numeric permissions using ls
	* du examples
	* Examples of Variables and Arrays in Bash
	* Give the Linux terminal an attitude
	* Mount image file on Ubuntu
	* Rsync mirror folders
	* Search for files with specific text in them
	* Send messages to other users
	* Show nume…</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:string_search&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:string_search</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:string_search&amp;rev=1572509100&amp;do=diff</link>
        <description>Search for files with specific text in them

find /var/www -type f -exec grep -l '/sync-clients/' {} \;

This will output all files with the specified string. The path in example is /var/www, and string we search for is /sync-clients/

grep -iRl 'text' .</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:tar&amp;rev=1572509100&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-31T09:05:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:tar</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:tar&amp;rev=1572509100&amp;do=diff</link>
        <description>Tar / Untar

tar -zcvf archive-name.tar.gz directory-name

Where,

	* -z : Compress archive using gzip program in Linux or Unix
		* -c : Create archive on Linux
		* -v : Verbose i.e display progress while creating archive
		* -f : Archive File name</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:up&amp;rev=1645166507&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-02-18T07:41:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:up</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:up&amp;rev=1645166507&amp;do=diff</link>
        <description>.bashrc up

To cd up a certain number of times, add this to your .bashrc file


up() {
        local d=&quot;&quot;
        local limit=&quot;$1&quot;
        if [ -z &quot;$limit&quot; ] || [ &quot;$limit&quot; -le 0 ]; then
                limit=1
        fi

        for ((i=1;i&lt;=limit;i++)); do
                d=&quot;../$d&quot;
        done

        if ! cd &quot;$d&quot;; then
                echo &quot;Path shallower than $limit&quot;;
        fi
}</description>
    </item>
    <item rdf:about="https://wiki.plecko.hr/doku.php?id=linux:shell_commands:var_and_arr&amp;rev=1618833371&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-04-19T13:56:11+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>linux:shell_commands:var_and_arr</title>
        <link>https://wiki.plecko.hr/doku.php?id=linux:shell_commands:var_and_arr&amp;rev=1618833371&amp;do=diff</link>
        <description>Examples of Variables and Arrays in Bash

var=&quot;http://wiki.plecko.hr/&quot;
echo $var
http://wiki.plecko.hr/



echo ${#var}
31



echo ${!var}



echo ${!U*}
UID USER USERNAME



echo ${var:7}
wiki.plecko.hr/


&lt;/code bash Returns 6 characters from position 12&gt;
echo ${var:11:6}
plecko
&lt;/code&gt;</description>
    </item>
</rdf:RDF>
