This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
key="$1" | |
for P in /bin /sbin /usr/bin /usr/sbin | |
do | |
if [ -x $P/smbclient ] | |
then | |
SMBCLIENT=$P/smbclient | |
break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+auto.master | |
/smb /etc/auto.smb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### user1 létrehoz egy fájlt: | |
user1@teszt:~$ touch enyime | |
### ha azt szeretnéd, hogy user2 is írhasson a fájlba, de nem akarod a csoportokat vagy az umaskot piszkálni, akkor így is adhatsz jogot: | |
user1@teszt:~$ setfacl -m u:user2:rw enyime | |
user1@teszt:~$ getfacl enyime | |
# file: enyime | |
# owner: user1 | |
# group: user1 | |
user::rw- | |
user:user2:rw- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#place this script to /usr/local/bin/stop-disk | |
if [ "" = "$1" ]; then | |
echo "Usage: `basename $0` device" | |
else | |
umount -l $1 | |
#extract the SCSI ID numbers from the output of lsscsi: | |
read -d ] A B C D < <(IFS=':'; echo $(lsscsi | grep $1)) | |
#remove the "[" from begining of A: | |
A=${A##*[} #quicker version: A=${A:1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+="/etc/init.d/hdparm hotplug" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="WDC WD20EARX-00P", SYMLINK+="BACKUP", RUN+="/bin/mount /mnt/backup" | |
ACTION=="remove", SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="WDC WD20EARX-00P", SYMLINK+="BACKUP", RUN+="/bin/umount -l /mnt/backup", RUN+="/usr/local/bin/stop-disk /dev/%k" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to add user into group, and make changes take effect *without logout/login*: the *newgrp* command | |
# | |
# Do note that this method will only update the groups, in the current shell session (and its child-processes). | |
# New shell sessions will not have the groups updated - either use this method to update the groups in each shell | |
# session, or logout/login to make the group update permanent by default | |
# | |
# In short: | |
# $ sudo adduser user_x my_grp | |
# $ newgrp my_grp && newgrp | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<a style="font-size: 20pt; color: red" href="http://www.ingyen-tarhely.eu/">http://www.ingyen-tarhely.eu</a> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright (C) 2012 Michael Gorven <http://michael.gorven.za.net/> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -p "Telekód: " -s line | |
echo -en "\nEgyenleg: " | |
wget -q --no-check-certificate -O - https://www.otpbankdirekt.hu/homebank/do/bankkartyaEgyenlegLekerdezes --post-data="azonosito=IDE_JÖN_AZ_AZONOSÍTÓ&telekod=$line&muvelet=login" | grep -e 'span class="value"' | head -1 | cut -d "<" -f 3 | cut -d ">" -f 2 |