How to List only regular file names in a directory on Linux and Windows
Listing regular files in a directory without including . and .. files.
Solution 1:$ ls -p | grep -v /
Solution 2: $ ls -F | grep -v ‘[/@=|]’
Solution 3: $for list in `ls` ; do ls -ld $list | grep -v ^d > /dev/null && echo $list ; done ;
Solution4:$ for list in `ls` ; do ls -ld $list | grep ^d > /dev/null || echo $list ; done ;
Solution5 (exclude sym links):$ for list in `ls` ; do ls -ld $list | grep -v ^l > /dev/null && echo $list ; done ;
Solution 1: dir /a-d /b >..\File_List.txt
How to list all processes holding a specific port on Linux and windows via command line
Let’s find all processes pid using port 80 on linux and windows:
What is Djamga – ShowUpAndPlaySports?
I have been playing soccer or football ever since I could walk. I played everywhere, in the streets growing up, in High school, in college, everywhere I go, I always figure out a way to play the beautiful game.
I also work as a Software Engineer and I started ShowUpAndPlaySports in 2009 to help people play pick up games in Calgary,AB, Canada. I then recreated the experience a few years later in Edmonton, AB, Canada. I started with 3 players and I now have more than 2400 players and counting in both cities.
Hard working professionals need to play team sports to stay active, network and just enjoy the beautiful games.
I was surprised how hard it was to find a pick up games in most cities in North America. So I decided to fix it.
After creating 2 successful Organized pick up sports league in Calgary and Edmonton, I wanted to help everybody in the world to find a place to play anytime. I have therefore created the App Djamga to do just that. You can use Djamga to find the following Pick Up or Drop in games around the world:
How to check how many CPU cores I have in Windows & Linux?
Open a command prompt (Windows) or Terminal (Linux) and type:
Windows: WMIC CPU Get /Format:List
Linux: cat /proc/cpuinfo | grep processor | wc -l
For more details on Linux: ls /sys/devices/system/cpu/
Powershell script to un-archive a folder silently in Windows
Let’s continue with our automation scripting tool series. Doing things on windows by using the mouse manually is fun until you run into the need to go to a major OS upgrade and have tons of applications to reinstall. To avoid human errors and save lots of time, you can write a script to pick up your archived applications like tomcat zip files and unarchive it. This powershell scripts shows you how to unarchive a zip file silently.
#Unzip FIle Function
function Expand-ZIPFile($file, $destination)
$shell = new-object -com shell.application
$zip = $shell.NameSpace($file)
foreach($item in $zip.items())
# Call the function to unzip
Expand-ZIPFile –File $Origin_Zip_File –Destination $Destination_Folder