Linux: различия между версиями
Перейти к навигации
Перейти к поиску
apt install vim
export PATH=$PATH:/sbin
export PATH=$PATH:/usr/sbin
apt install htop tcpdump mc ncdu pydf pwgen nmap nmon atop hwinfo curl aptitude screen locate -y
ls -l /etc/alternatives/editor
update-alternatives --config editor
Press <enter> to keep the current choice[*], or type selection number: 3 <choose 3>
SELECT version(); - версия postgres
\dt все таблицы активной базы
SELECT * FROM cwd_user; вся таблица пользователей cwd_user
SELECT * FROM cwd_user WHERE active = 'F'; вся таблица активных пользователей cwd_user
SELECT id, user_name, display_name, lower_display_name, external_id FROM cwd_user; вся таблица пользователей cwd_user со столбцами...
SELECT * FROM logininfo; все данные таблицы logininfo
SELECT * FROM user_mapping; все данные таблицы user_mapping
SELECT * FROM cwd_user;
SELECT username FROM logininfo; username из столбца logininfo
SELECT successdate, username FROM logininfo WHERE successdate < '2022-01-01' ORDER BY successdate; List active users who have not logged in since a specific date
SELECT id, user_name, display_name, lower_display_name, external_id FROM cwd_user; по полям... из таблицы cwd_user
SELECT successdate, prevsuccessdate, faileddate, username FROM logininfo li WHERE successdate > '2022-01-01' ORDER BY successdate;
SELECT cd.directory_name, cu.user_name, prevsuccessdate, li.successdate, faileddate, display_name FROM logininfo li
JOIN user_mapping um ON um.user_key = li.username JOIN cwd_user cu ON um.username = cu.user_name JOIN cwd_directory cd ON cu.directory_id = cd.id
WHERE cd.directory_name = 'tps.local' and successdate > '2022-01-01' ORDER BY successdate;
SELECT cu.user_name, cd.directory_name, prevsuccessdate, li.successdate, faileddate, display_name FROM logininfo li
JOIN user_mapping um ON um.user_key = li.username JOIN cwd_user cu ON um.username = cu.user_name JOIN cwd_directory cd ON cu.directory_id = cd.id
WHERE cd.directory_name = 'tps.local' and successdate < '2022-01-01' ORDER BY successdate;
(не показано 18 промежуточных версий этого же участника) | |||
Строка 1: | Строка 1: | ||
− | <h3> | + | <h3>Configuring Debian Linux:</h3> |
− | < | + | |
− | <li>apt install | + | <h5>Step 1. Install apt</h5> |
+ | <li>apt install vim | ||
<li>export PATH=$PATH:/sbin | <li>export PATH=$PATH:/sbin | ||
<li>export PATH=$PATH:/usr/sbin | <li>export PATH=$PATH:/usr/sbin | ||
<li>apt install htop tcpdump mc ncdu pydf pwgen nmap nmon atop hwinfo curl aptitude screen locate -y | <li>apt install htop tcpdump mc ncdu pydf pwgen nmap nmon atop hwinfo curl aptitude screen locate -y | ||
<br> | <br> | ||
− | < | + | |
+ | <h5>Step 2. Change default editor</h5> | ||
<li>ls -l /etc/alternatives/editor | <li>ls -l /etc/alternatives/editor | ||
<li>update-alternatives --config editor | <li>update-alternatives --config editor | ||
<li>Press <enter> to keep the current choice[*], or type selection number: 3 <choose 3> | <li>Press <enter> to keep the current choice[*], or type selection number: 3 <choose 3> | ||
<br> | <br> | ||
+ | |||
<h3>Confluence postgres examples queries</h3> | <h3>Confluence postgres examples queries</h3> | ||
+ | |||
+ | <li>SELECT version(); - версия postgres | ||
<li>\dt все таблицы активной базы | <li>\dt все таблицы активной базы | ||
<li>SELECT * FROM cwd_user; вся таблица пользователей cwd_user | <li>SELECT * FROM cwd_user; вся таблица пользователей cwd_user | ||
Строка 23: | Строка 28: | ||
<li>SELECT id, user_name, display_name, lower_display_name, external_id FROM cwd_user; по полям... из таблицы cwd_user | <li>SELECT id, user_name, display_name, lower_display_name, external_id FROM cwd_user; по полям... из таблицы cwd_user | ||
<li>SELECT successdate, prevsuccessdate, faileddate, username FROM logininfo li WHERE successdate > '2022-01-01' ORDER BY successdate; | <li>SELECT successdate, prevsuccessdate, faileddate, username FROM logininfo li WHERE successdate > '2022-01-01' ORDER BY successdate; | ||
− | + | <br> | |
− | + | <li>SELECT cd.directory_name, cu.user_name, prevsuccessdate, li.successdate, faileddate, display_name FROM logininfo li | |
− | <li>SELECT | + | JOIN user_mapping um ON um.user_key = li.username JOIN cwd_user cu ON um.username = cu.user_name JOIN cwd_directory cd ON cu.directory_id = cd.id |
− | JOIN user_mapping um ON um.user_key = li.username JOIN cwd_user cu ON um.username = cu.user_name JOIN cwd_directory cd ON cu.directory_id = cd. | + | WHERE cd.directory_name = 'tps.local' and successdate > '2022-01-01' ORDER BY successdate; |
− | WHERE successdate > '2022-01-01' ORDER BY successdate; | + | <br> |
− | |||
− | |||
<li>SELECT cu.user_name, cd.directory_name, prevsuccessdate, li.successdate, faileddate, display_name FROM logininfo li | <li>SELECT cu.user_name, cd.directory_name, prevsuccessdate, li.successdate, faileddate, display_name FROM logininfo li | ||
JOIN user_mapping um ON um.user_key = li.username JOIN cwd_user cu ON um.username = cu.user_name JOIN cwd_directory cd ON cu.directory_id = cd.id | JOIN user_mapping um ON um.user_key = li.username JOIN cwd_user cu ON um.username = cu.user_name JOIN cwd_directory cd ON cu.directory_id = cd.id | ||
WHERE cd.directory_name = 'tps.local' and successdate < '2022-01-01' ORDER BY successdate; | WHERE cd.directory_name = 'tps.local' and successdate < '2022-01-01' ORDER BY successdate; | ||
+ | <br> | ||
+ | <h3>Other cases</h3> | ||
+ | <ol> | ||
+ | <li>Microsoft</li> | ||
+ | <li>Google</li> | ||
+ | <li>Apple</li> | ||
+ | <li>IBM</li> | ||
+ | </ol> | ||
+ | |||
+ | <ul> | ||
+ | <li>Пункт 1.</li> | ||
+ | <li>Пункт 2. | ||
+ | <ul> | ||
+ | <li>Подпункт 2.1.</li> | ||
+ | <li>Подпункт 2.2.</li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | </ul> |
Текущая версия на 13:19, 11 апреля 2022
Содержание
Configuring Debian Linux:
Step 1. Install apt
Step 2. Change default editor
Confluence postgres examples queries
Other cases
- Microsoft
- Apple
- IBM
- Пункт 1.
- Пункт 2.
- Подпункт 2.1.
- Подпункт 2.2.