Cron jobs allow you to run a command at a specified time.
To edit and list cron jobs use the crontab command
| Short Flag | Description |
|---|---|
| -e | Edit the users crontab file |
| -l | List the users cron jobs |
| -u [user] |
# crontab [-u user] [options]
# List the cron jobs of the root user
crontab -l -u root
# Edit cron jobs of the root user
crontab -e -u rootThere are editors online that will help you set the time. The site below explains what the syntax is.
The command to create links is the ln command.
This can create two different links a symbolic link and a hard link.
| Type | Inode |
|---|---|
| Symbolic | Different inode numbers |
| Hard | Same inode Numbers |
| Short Flag | Long Flag | Description |
|---|---|---|
| -f | --force | remove existing destination files |
| -s | --symbolic | Make symbolic links instead of hard link |
# ln [options] <source location> <link location>
# Put a link to the doc.txt file on the desktop
ln -s /home/user/documents/doc.txt /home/user/desktop
# Link a directory
ln -s /mnt/c/Users/user/Desktop /home/user/desktopA command to get data from the internet is the curl command.
| Short Flag | Long Flag | Description |
|---|---|---|
| -f, | --fail | Fail silently on server errors. |
| -G, | --get | Http get request. |
| -s, | --silent | Silent or quiet mode. |
| -S, | --show-error | When used with -s, --silent, it shows an error message if it fails. |
| -H, | --header | Add a request header |
| --compressed | Request a compressed response automatically decompress the content. | |
| --data-urlencode | Post data encoded for urls |
# curl [options / URLs]
curl -fGsS -H 'Accept-Language: en' --compressed 'wttr.in'Various specifications specify files and file formats. This specification defines where these files should be looked for by defining one or more base directories relative to which files should be located.
User-specific executable files may be stored in
$HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.
$XDG_DATA_HOMEdefines the base directory relative to which user-specific data files should be stored.
data_home="${XDG_DATA_HOME:-$HOME/.local/share}"
$XDG_CONFIG_HOMEdefines the base directory relative to which user-specific configuration files should be stored.
config_home="${XDG_CONFIG_HOME:-$HOME/.config}"
$XDG_STATE_HOMEdefines the base directory relative to which user-specific state files should be stored. The$XDG_STATE_HOMEcontains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in$XDG_DATA_HOME. It may contain:
- actions history (logs, history, recently used files, …)
- current state of the application that can be reused on a restart (view, layout, open files, undo history, …)
state_home="${XDG_STATE_HOME:-$HOME/.local/state}"
$XDG_CACHE_HOMEdefines the base directory relative to which user-specific non-essential data files should be stored.
cache_home="${XDG_CACHE_HOME:-$HOME/.cache}"Source - https://specifications.freedesktop.org
This will require editing the fstab file.
sudo nano /etc/fstab