Posts

Showing posts from April, 2015

chown lsof 3yy 3dd

The current status of a Linux software raid is written to the file /proc/mdstat. You can view the status on the shell with the command: cat /proc/mdstat -=-=-=-=-= a daemon (/ˈdiːmən/ or /ˈdeɪmən/)[1] is a computer program that runs as a background process, rather than being under the direct control of an interactive user. http://www.linuxquestions.org/ questions/linux-general-1/ what-is-the-difference- between-export-and-set-112019/ http://stackoverflow.com/ questions/12382086/difference- between-contents-of-two- directories -=-=-=-=-= check all running services http://www.cyberciti.biz/faq/ check-running-services-in- rhel-redhat-fedora- centoslinux/ http://unix.stackexchange.com/ -=-=-=-=-= Where are sudo incidents logged? http://unix.stackexchange.com/ questions/70684/where-are- sudo-incidents-logged -=-=-=-=-= How to make a hidden file in linux - You can just add a . to the front of the file name. -=-=-=-=-= How to delete all files ...

tar

tar -zcvf data.tgz *.doc  - compress tar -zxvf data.tgz  - decompress tar -cf arhive.tar foo bar  - create archive with files foo bar tar -tvf file.tar  - list file.tar Now I want to extract a specific folder in the tarball (which inside the tarball lies in  /tmp ) into a specific folder: cd / tmp tar - xfvz archive . tar . gz folder / in / archive - C / tmp / archive $tar --create --verbose --same-permissions --file /mnt/zip/tarball1 /home/etc/ ls /mnt/zip - here is created file tarball1 --create - create a tar file --extract - extract a tar file --verbose - get different errors --same-permissions - maintenance the permissions of the directory where the files are copying --file - creates file ---------------------- tar cvpf /home/iam/tarfile /home /etc tar cvpf /home/iam/tarfile <--where data-blogger-escaped-be="" data-blogger-escaped-can="" data-blogger-escaped-do="" data-blogger-escaped-file="...

VPN iwconfig

You can manage wireless connections in Linux using 3 wireless configuration utilities iwconfig iwlist iwpriv   you can implement VPN using OpenVPN, SSH, VPN Daemon   pty-redir is used to configure PPP link through an SSH tunnel   To install OpenVPN you can use the Redhat Package Manager ( RPM ) mechanism if the distribution of Linux supports the feature

redirect to 2 files

echo test | tee file1 >> file2

Omit # in file CPU numbers Free RAM

Omit # in file   grep '^[^#]' sc echo -n "T " read val echo -n $val echo -n "result $((val+10))" -=-=-=-=--=-=-=-=--=-=-=-=- CPU numbers cat /proc/cpuinfo | grep proc | wc -l   fdisk -l  -  fdisk command can display the partitions and details like file system type http://www.binarytides.com/ linux-command-check-disk- partitions/   see your DNS server address less /etc/resolv.conf   -=-=-=-=--=-=-=-=--=-=-=-=- check your ip address ip addr show ifconfig hostname –i -=-=-=-=--=-=-=-=--=-=-=-=- http://www.tecmint.com/ command-line-tools-to-monitor- linux-performance/ Lsof – List Open Files -=-=-=-=--=-=-=-=--=-=-=-=- Free RAM free –m -=-=-=-=--=-=-=-=--=-=-=-=- SCSI/Sata devices   cat /proc/scsi/scsi   -=-=-=-=--=-=-=-=--=-=-=-=- Show working directory $ pwdx 12136 12136: /home/saml =-=-=-=-=-=-=-=-=-= When you use aptitude to remove a package that you installed with aptitu...

cat tr pwdx

cat file1 | tr -d ' ' #removes spaces w | tr a-z A-Z w | tr '  ' '\t' list only executable files ls -F | grep \*$ list folders ls -F | grep \/$ ----- bash-3.00# cat 1.txt ro ot co nsole Apr 10 15:17 (:0) root pts/3 Apr 10 15:20 (:0.0) bash-3.00#  cat 1.txt | tr -s '\n' ro ot co nsole Apr 10 15:17 (:0) root pts/3 Apr 10 15:20 (:0.0) --------- http://www.cyberciti.biz/faq/ unix-linux-adding-path/ Three ways to run program 1 bash filename 2 ./filename 3 add working directory in the PATH variable ------ http://en.kioskea.net/faq/944- modifying-a-read-only-variable http://stackoverflow.com/ questions/17397069/unset- readonly-variable-in-bash -=-=--=-=--=-=--=-=--=-=--=-=- Daemons https://wiki.archlinux.org/ index.php/Daemons_list book UNIX and Linux System Administration Handbook http://www.admin.com/ -=-=-=-=-=-=-=-=-=-=-=-= pwdx PID  # report current working direc...

tree newdir

tree newdir