Added: 2 years ago
From: metalx1000
Views: 15,240
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (45)

Sign In or Sign Up now to post a comment!
  • man i remembere I was able to take screenshots every few seconds with something close to this

    "while [ 1 ];do import -window root 101{1..10}.jpg;sleep 5s;done"

    but back then those 10 screenshot wouldn't be overwritten and at the 10th picture the while loop would stop. Do you have any idea.

  • Thank you for the wonderful tutorials. You rock! 

  • @giannis321giannis321: Nope problem, you are welcome.

  • Combined with some image manipulation concepts from some of your other tutorials, this can be used as a very neat tool to clean up naughty images from one's hdd without risking unauthorized recovery of said files by nosy persons:

    ls|while read pic;do convert -modulate 0 "$pic" "$pic";done

    This will overwrite any jpg in the directory from which it is run with black pixels. However, you could just as easily perform any action you wish... Use your imagination!

  • @cmommsen1: I like that you are being creative and using the things you learn and know to come up with solutions to problems. I only see one problem. Just because you are replacing a file with the converted file doesn't mean that the new file is being written to the same place on the hard drive. So, file recovery would still be possible in some cases.

    But, still, I like that you are thinking and using your imagination. That is a needed thing to become a good programer.

  • @metalx1000 Yeah that's a good point, especially on a complex storage configuration like RAID or SSD systems where the drive's I/O chips are performing complex caching operations.

    So what would say would be a good way to edit an file in a way that modifies the actual 1's and 0's of that file in real time? I know there are many programs for permanently erasing files, but it seems like all it should really take is a simple script or single command.

  • @cmommsen1: Well, to over write and entire drive or partition you could do something like this:

    dd if=/dev/zero of=/dev/hda

    As far as over writing certain places on a drive, I don't know. Never tried that. I'm sure there is a way. I mean besides rapidly writing and deleting files to a drive, which would not be good for the drive for a few reasons and still wouldn't grantee you got the spots you wanted.

  • Can you explain more about the while command?

  • @theif519: Sure, I'll make a video right now going over the while command a little more. Is there anything in particular you want to know?

  • @metalx1000 For instance, the "While [ # ]" command, Would the number be the variable it starts with?

  • @theif519: I think you mean "$#" and I think it would be more like "while [ $#  -lg 3 ]" or something like that depending on the situation. But, that's getting more into arguments, not while loops. But, I will be uploading a new while loop video in a bit.

  • @metalx1000 a tutorial about arguments would be good to , please

  • cool

  • 7:18 they're QUOTATION MARKS! Not "brackets, "parenthesis," or any other punctuation symbol!

    Cool vid! :)

  • 3:51 where did "whi" come from ?!!

  • @tsumulunch5: Ha, I hadn't noticed that before. Much be a glitch in the video from compressing it. It should be 'let'

  • @metalx1000 thanks for quick reply!! i will be ur fan more and more hahaaa

  • @tsumulunch5 it's an error in video encoding :/ it says let x=1;

  • cool tutorial can you make about how to make a file finder? i type something and it will list files that i type for example *.mp3 i know i can make it with a simple ls command but it could look user friendly. :D sorry for my english.. im hungarian :D

  • @doomi96: Well, you could do one of the following:

    ls *.mp3

    or

    find -iname "*.mp3"

  • @metalx1000 yes it works but i want a script that more user friendly you know.. which is interactive

    its echos what are you searching and read a variable then it tipes things D:

  • in which lesson you explain the "if" statement?

  • @StarVini4anec: I've used them in a bunch of my videos, but I'm not sure if I made one on just that subject. If you Google "bash if then else" the first few sites will give you plenty of examples and explanations.

  • Hi,

    thanks for your videos all very informative, however on this video I'm having a problem with the last while loop, it plays the 1st song and then I'm getting the following error msg..

    Exiting... (End of file)

    cut: invalid option -- 'F'

    Try `cut --help' for more information.

    I have checked the line several times and it's exactly the same as yours... please let me know what is wrong

    thanks

  • @ershadz69: looks like you are using an "F" instead of an "f" in the cut command.

  • @metalx1000: yes that was the problem thanks, however I'm still having a problem. it looks like mplayer does not like to play songs if there is a ( in the name... so the 1st 3 songs don't have any ( in them... I gave a head -3, and it played but only the 1st song... and then it says exiting.. (end of file).... before I gave it head -3 it wouldn't play anything at all...

  • @ershadz69: did you put your variable in quotations?

  • @metalx1000 yes I did, and checked it several times.... I end up changing it to if statement and it is working... thanks....

  • this was very good, thank you! It's about at the level I need to be working on. The only thing I could say is that it would be good if you were working within a script in vi, but for speed in showing what those tools do it's perfect

  • very nice stuff thanks... I've been doing Windows batch for nearly 2 years and didn't even know what the linux version was called till now :)

  • @goompapa: I use to use Batch files for everything back in my Windows days. You'll find shell scripts to be way more powerful an BASH is the most common used right now, but not the only shell environment.

  • @esucceur: since I switch to Linux, so about 5 years. But I was big into Batch scripts back in my Windows days. Kinda the same idea, but at the same time very different.

  • cool man! im learning these stuffs in school right now... ur vids really help me to understand better!

  • @reverse342: Glade I could help.

  • great. everyone who is learning Linux should know your video link

  • You are awesome, I am learning a lot easier then I was from just reading things. You explain everything really well. Good job!

  • Glade I could Help.

  • Metalx1000, thank you very much for your super quick response. Thank you also for your advice.

    I will take everything you mention on-board and will certainly check out Linux at some stage - hopefully, once I get through the Unix/bash book I'm reading.

    Thank you again for your help. I will check out all your other videos. Thank you very much for posting them up. Your explanations are second to none.

    Thank you.

  • Hi there! Metalx1000, thank you very much for your tutorials! I've been through many tutorials in my time but yours are by far and away the best. You're very good at explaining things. Thank you.

    I'd appreciate it if you can help me. I tried installing lynx as you described, however, the Terminal (I'm using bash on Mac OS X 10.6) tells me

    -bash: aptitude: command not found

    is there anything I can do to rectify this issue.

    Many thanks for all your help.

    Please keep the tutorials coming.

  • Aptitude is a Package Manager for Linux. A Program that is used to install pretty much any program you need from servers setup for Linux. As far as I know Mac doesn't have anything like it since most Programs used in Mac OS are Proprietary. You can search "lynx for Mac" on Google and you should find the DMG files for it. Although since you will be downloading it from a website you don't real know what you might be getting. Mac OS does have cURL installed. It does what Lynx does and more.

  • I have done a few tutorials on cURL, so look for them in my Video List.

    You may also want to check out Linux sometime. You can run it write off a CD without the need to install. And even off a CD it runs pretty fast on Apple hardware. I would suggest trying LinuxMint for a beginner.

  • great videos, very helpful, thanks alot

  • great! i got a unix test this sunday. your videos are certainly helping me prepare better :D

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more