I came across a couple of Linux commands that I have not used before and wanted to share them in case anyone else find them useful. I used them to determin who was on a linux server as well as when the server last rebooted for troubleshooting a web server problem. The command are last […]
You are browsing archives for
Category: scripts
How do I include the date in a Windows Batch file?
I have used this many times to add a date in batch files. This example works for Windows batch files but can be adjusted for other uses. You can set any variable, in my example below called “thedate” to a substring of the computers date to produce only the numbers without any “/” in case […]
Useful Linux Command – with output redirection
This one has been around for a while but in case you have not come across (and in case I forget myself) here is another useful Linux command: ls > textfile.txt This is a simple way to get a list of files in a certain folder and rather than write them to the screen it […]
Small Batch File to get a list of files in a certain direct...
If you have ever needed to get a simple list of files in a particular folder from a command line or batch file, here is a small batch file that should work for you. Create a text file named filelisting.bat. In that file copy the following line of text dir C:folderthatyouchoose /a /b /-p /o:n […]
Small Batch file to transfer files over FTP
I was going through some old archived files and thought this one might be useful. This small script will transfer files over ftp from a batch file. First create a file called ftpget.bat and copy the following lines into the file ftp -s:get.txt Next create a second file called get.txt. The name doesnt matter just […]
How to FTP files automatically.
The below script may come in handy for someone that needs to pull files for whatever reason to a separate location for processing. I realize that this is not the only method to do this but this has been working for me for years. I use the script to pull IIS log files from an […]
Small Shell Script for Linux
Here is one shell script I used recently. Now I am not the most fluent in scripting languages so this is probably not the only way to do this but it may help someone else who is trying to do something similar in a shell script. This was used for gzip’ing many .dmp files that […]
Too many Zombies???
Ever run a “top” command on a linux machine and notice a number of “zombie processes”? Zombies are already dead processes that you really cant get rid of without a reboot.Ususally they are harmless and take almost no resources. To view what process ids are the zombies you can use this command from a command […]