Basics

Write in a file w/ a single command:

single line:

echo "hello world" > file  # “create/overwrite” operation
echo "hello world 2" >> file  # concatenate (append)

Multiple lines (Heredoc):

circle-check

create/overwrite

cat > file <<EOF
bla bla
...
bla bla
EOF

concatenate (append)

cat >> file <<EOF
bla bla
...
bla bla
EOF

Alt method for fish shell

replace '>>' with '>' for overwrite.

Create Desktop shortcut

For Scripts/Programs:

You can also look at existing shortcuts by doing: ls -l /usr/share/applications/

User specific shortcuts for app menu are in ~/.local/share/applications

For file/folder shortcut:

Scheduling tasks

(Option 1) Create a service with auto execution at startup:

(Option 2): Schedule tasks with crontab:

Crontab is more versatile, you can schedule very minute, hour, at reboot, whatever you want, see https://crontab.guru/arrow-up-right for help.

Here are the 2 most usedul crontab commands:

Here is 2 ways of scheduling tasks at reboot, if your task is complex, prefer shell script:

Zip & Unzip Using tar

Zip

Unzip

Unzip from web

Last updated