Some very interesting and evil shell tricks.
How to create a file with a blank filename and then delete this file. This is not too hard at all.
How to create a file with a blank filename and then delete this file. This is not too hard at all.
This is an interesting bash scripting trick. This allows deleting the first 10 lines from a text file, but keeping the rest of the file instead of deleting it. X=10 file="file.txt" # read the file, line by line while read -r line; do # add current line to array # (you can modify this to … Read more
The new Windows 10 update includes a feature that auto deletes user`s important files. This is very embarrassing, this does protect sensitive files from the prying eyes of the NSA, but it is not good if your prized wedding photos are deleted. It consistently amazes me that people do not make backups or have redundant … Read more
Here is one for any experimenters out there… It is possible to create files which simply cannot be deleted from the standard shell. To do this you will have to physically create the file using a script or a text editor, and you will have to use a sequence of control characters which cannot be … Read more
Deleting a directory on Linux is very easy indeed. The rmdir command will perform this task adequately. You could also use the rm -rf abc/ command to delete a directory, but rmdir is easier to remember. eyjafjallajkull% rmdir abceyjafjallajkull% rmdir abc The rmdir command will not be able to delete a directory that is not … Read more
The touch command ordinarily does not allow the user to create files with a filename like –rf, but if you want to really annoy someone then you may use this command to create one. homer@debian:~$ touch — ‘–rf ‘homer@debian:~$ touch — ‘–rf ‘ And now you have a file named –rf. -rw-r–r– 1 homer homer … Read more
Following on from my previous posting that covered setting up a MySQL database, here is a simple query that returns records that match a certain type. mysql> select * from operatingsystems where Type = "Windows"; +——+————-+———+———–+ | OsID | Name | Type | vendor | +——+————-+———+———–+ | 1 | Windows 3.0 | Windows | Microsoft … Read more
This HTML5 video isn’t supported in your browser. If you don’t see a video here or can’t play it, download it here: High quality MP4 | Low quality MP4 The copy and move operations in Windows are to be repaired, previously in Windows the copy and move operations were quite hit and miss with the … Read more