Advertisement
v1ral_ITS

more notes

Aug 13th, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.84 KB | None | 0 0
  1. pkexec rsync -r -p -v --ignore-existing --modify-window=1 -D --existing -z -i /media/d0ctor/SD_CARD /media/d0ctor/SD_CARD/MY_BACKUPS
  2.  
  3.  
  4.  How to Open Disk Management From Command Prompt
  5.  
  6. Time Required: Opening Disk Management from the Command Prompt only takes several seconds, and probably much less once you learn the command.
  7.  
  8.     In Windows 10 and Windows 8, open Run from the Start menu or Apps screen (or see the A Quicker Method... section at the bottom of the page for an even faster way to get to Disk Management than using its command).
  9.         In Windows 7 and Windows Vista, click on the Start button.
  10.         In Windows XP and earlier, click on Start and then Run.
  11.     Type the following Disk Management command in the text box:
  12.  
  13.     diskmgmt.msc
  14.  
  15.     ...and then hit the Enter key or press the OK button, depending on where you ran the command from.
  16.         Note: Technically, opening Disk Management from the Command Prompt would require that you actually open the Command Prompt program. However, running an executable program like diskmgmt.msc from the search or Run box accomplishes the same thing.
  17.         Note: Also, technically, diskmgmt.msc is not the "Disk Management command" any more than any non command-line tool's executable is a "command." In the strictest sense, diskmgmt.msc is just the Run command for the Disk Management program.
  18. You must extract it but you dont must extract it to your harddrive you can use stdtout and pipe it to genisoimage or mkisofs
  19.  
  20.  
  21.  
  22. tar --to-stdout xf tareddata.tar | genisoimage -o image.iso  tareddata
  23. test it: mount -o loop image.iso /mnt
  24.  
  25. you can write a small script to automize this issue
  26.  
  27.  
  28.  
  29.  
  30.  
  31. #!/bin/bash
  32. FILES="$@"
  33. for f in $FILES
  34. do
  35.        # if .bak backup file exists, read next file
  36.     if [ -f ${f}.bak ]
  37.     then
  38.         echo "Skiping $f file..."
  39.         continue  # read next file and skip the cp command
  40.     fi
  41.        # we are here means no backup file exists, just use cp command to copy file
  42.     /bin/cp $f $f.bak
  43. done
  44.  
  45. for I in 1 2 3 4 5
  46. do
  47.  statements1      #Executed for all values of ''I'', up to a disaster-condition if any.
  48.  statements2
  49.  if (condition)
  50.  then
  51.     continue   #Go to next iteration of I in the loop and skip statements3
  52.  fi
  53.  statements3
  54. done
  55.  
  56. Sat Aug 11 18:17:48 EDT 2018
  57. NOTE: gdialog --backtitle "Word Count Script"  --msgbox "Words: $a" 25 20
  58.  
  59. Sun Aug 12 05:40:05 EDT 2018
  60. NOTE: (tar cf - .) | (gzip > /tmp/bin.tar.gz)
  61.  
  62. Sun Aug 12 09:11:49 EDT 2018
  63. NOTE: find . -print | cpio -pdm /target/folder
  64.  
  65.  
  66. Sun Aug 12 10:21:55 EDT 2018
  67. NOTE: time (pbar | (tar cf - . | gzip > out.tgz) 2>&1 )
  68.  
  69. Sun Aug 12 10:37:00 EDT 2018
  70. NOTE: tar -C $PWD --numeric-owner -S -c . | pv -tpeba -s 100G | tar -C /tmp/bin --numeric-owner -S -xp
  71.  
  72. Sun Aug 12 10:56:15 EDT 2018
  73. NOTE: tar --to-stdout -S -c . | pv -tpeba -s 10G | gzip > /bkup/test.tar.tgz
  74.  
  75. Sun Aug 12 11:07:58 EDT 2018
  76. NOTE: shell script example of checking for your scritps needed apt packages
  77.  
  78. needed_tool='youtube-dl ffmpeg'
  79. require_tools () {
  80.     local NOT_AVAIL=""
  81.     for TOOL in $needed_tool; do
  82.     if [ "`which $TOOL 2> /dev/null`" == "" ]; then NOT_AVAIL="$NOT_AVAIL $TOOL";
  83.     fi
  84.     done
  85.     if [[ "$NOT_AVAIL" != "" ]]; then echo "ERROR: The following required tool(s) cannot be found: $NOT_AVAIL"
  86.     exit
  87.     3
  88.     fi
  89. }
  90.  
  91.  
  92.  
  93.  
  94. # Check If Package Downloaded
  95. require_tools
  96.  
  97. Mon Aug 13 01:23:37 EDT 2018
  98. NOTE: s openvpn --config vpnbook-ca1-tcp80.ovpn --auth-user-pass ./vpnbook.auth
  99.  
  100. Mon Aug 13 01:25:54 EDT 2018
  101. NOTE: cat /media/d0ctor/MISC./g0ne.iso/.dr3
  102.  
  103. Mon Aug 13 18:26:40 EDT 2018
  104. NOTE: type -a 'CMD'
  105.  
  106. Mon Aug 13 21:27:15 EDT 2018
  107. NOTE: nmcli connection show nmcli device show
  108.  
  109. Mon Aug 13 21:33:19 EDT 2018
  110. NOTE: ls . | zenity --title "Choose File From Current Direcotry" --list --column "ImPerial TeK. Solutions {v1ral_ITS}" --width=1000 --height=200
  111.  
  112. Mon Aug 13 22:49:07 EDT 2018
  113. NOTE: gnome-session-quit --reboot
  114.  
  115. Mon Aug 13 22:49:20 EDT 2018
  116. NOTE: gnome-session-quit --logout
  117.  
  118. Mon Aug 13 22:49:34 EDT 2018
  119. NOTE: gnome-session-quit --power-off
  120.  
  121. Mon Aug 13 23:00:06 EDT 2018
  122. NOTE: PS1 = notes
  123. %F{blue}ITS%F{red}_%F{white} %F{yellow}~
  124. %F{blue} %Bv%F{green}%b1%Br%F{cyan}%bal%F{red}_%BITS %b%U%@%u -
  125. %b%F{red}%BITS%b%F{red} %F{white}%B<%/> %U%B%F{yellow}%@%u%F{black}-%b%F{white}%u %F{yellow}%k
  126.  
  127. Mon Aug 13 23:10:12 EDT 2018
  128. NOTE: qps is a system and process monitor
  129.  
  130. Mon Aug 13 23:35:00 EDT 2018
  131. NOTE: cp -r -u -v $SOURCE $DESTINATION
  132.  
  133. Mon Aug 13 23:43:57 EDT 2018
  134. NOTE: you can create a file with "touch new.tar.gz" then use archivemount new.tar.gz /tmp/new and cp or mv any and all files to /tmp/new then fusermount -u /tmp/new and all the files will be in the new arhive
  135.  
  136. NOTE:
  137.  
  138. read FILE < <( echo "$(yad --file --multiple --width=800 --height=600 \
  139.         --title="Select Files")" )
  140.  
  141. Tue Aug 14 00:25:11 EDT 2018
  142. NOTE: tar cf - . | pv -tpeba -s 1G | gzip > awesome.tar.gz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement