Search the Community
Showing results for tags 'unix'.
-
I'm curious if it is possible to achieve above nvme similar speeds on a ramdisk using Linux's ramfs file system moving and transferring files from one ramdisk to another? I have tried and I haven't got great results, and in some cases are worse than my nvme ssd. If possible what tweaks or suggestions to make it faster could I deploy?
-
So I got a device called a VIPER-400-M64-F32 at an auction. It's a relatively fast microcontroller based on arm that I want to program on. It was supposed to come with a operating system called redboot but when I connect to it through serial that is not the case and this pops up. I'm pretty sure this is a unix based operating system but its strange in the fact that most traditional commands don't work. I have looked up QNX Neutrino but I can't seem to find any helpful information. So far the only commands that I have found that do anything are: cd, exit, export, shutdown, reset, sh, pwd Commands that don't work (No such file or directory): ls, login, mount, mnt, help, ?, basename, echo, env, sudo, id, mkdir, tty, bash, and more I have tried resetting the path variable using export but the commands still don't work Additionally on restart the path gets reset and export shows PATH=/proc/boot:/bin:./:/ SYSNAME=nto Shutting down the device results in the text below. All of those names are recognized in the terminal but don't seem to do anything useful I would greatly appreciate it if any one had an idea of how I could get this into a more usable state. This device seems like it would be really cool for some projects but I can't do anything with it right now. If you have any commands or test you would like me to run I am happy to do so!
-
This is a project I've been meaning to get off the ground for quite some time. Given my work schedule I only predict I'll be able to work on it and post updates once a week so to all who chose to follow along I ask for your patience. For those clicking because they're not familiar with the SAN & iPXE terminologies: This is a special network project I've been planning and have had in the works for a number of months. Finally I have everything I need to get it started and I figured some of you might like to follow along. I plan to write a full tutorial based on what ends up working here if you'd like to try building something like this yourself. The focus of this build log is to setup a small series of servers so that they all boot off of a network resource. The reasons for doing this are: Ease of Repairability Reduce Downtime Ease of Scalability Overall it's very cool to me and I want to play with it. :3 The build log is going to consist of four main stages: Preparing the network hardware (assembling, configuring, firmware updates) Setting up our hypervisor server (installing NICs, configuring IP's, preparing Virtual Machines) Configuring the hosting servers (iSCSI & DHCP servers) Setting up the client servers (establishing iSCSI connections, installing OS's from scratch) In the end these client servers will act as nodes and with this network additional nodes will be added in the future. For the time being this is the network hardware we'll be working with: 2x PCIe-10G-SFP+ made by TG-NET based on the BCM57810S controller. These will be installed in the hypervisor server and will be in charge of hosting the virtual disks our nodes will boot from. 3x 10Gbe SFP+ Mellanox ConnectX-2 MNPA19-XTR network cards These 10 Gigabit NIC's are very old but very cool for networking aficionados, did I mention they're cheap? 14x FiberStore 10G SFP+ 850nm 300m transceivers. These are cheap SFP+ modules that convert the electrical signals that the NIC puts out and converts them to laser light signals that we can hook-up our fiber patch cables to. 7x OFNR LC/UPC-LC/UPC 50/125 OM4 Multimode Fiber-optic patch cables These are a inexpensive glass/ceramic composite fiber optic patch cables. They're easy to get and are good for short runs. I've only tested them for 10Gig up to 50ft but I'm sure you can use them for longer runs. Tonight is just an introduction. I will try to get something started tomorrow. I'm excited to get this underway and to try and overcome the hurdles I'll inevitably have to cross.
- 34 replies
-
- san
- fiber-optics
-
(and 3 more)
Tagged with:
-
So I recently copied over some .isos, namely Manjaro and Arch over to my NAS just to have them in a pinch if I need them when I'm somewhere. I'm trying to move them to a new folder so they're not just unorganized on my NAS but the files won't move or delete. The error: You require permission from Unix User\www to make changes to this file I have no clue why it's doing this. Computer accessing from is a Windows 10 Desktop FreeNAS-11.3-U5 running on the NAS Just a minor inconvenienced that's quite annoying that I want to nip in the butt before I forgot to.
-
How does QEMU perform compared to VirtualBox on macOS? On my Kubuntu gaming desktop, I use QEMU/KVM for all of my virtualization due to being able to do GPU passthrough & being generally faster than VirtualBox. I’m not that familiar with macOS as this is the first time I’ve ever used it (job requirement). My coworker/mentor recently just talked about UTM, which seems interesting and might perform better on my 2016 MacBook Pro compared to VirtualBox because it only supports macOS. Only reason I’m using VirtualBox is because I needed something quick, and I know it works (VMware isn’t free at all). Edit: adding Apple Virtualization. Just saw that when I launched UTM, and I'm not exactly sure what that is or how it compares.
-
- qemu
- virtualbox
-
(and 2 more)
Tagged with:
-
Hello, I'm trying to use Man pages to learn about different Linux commands but it seems very verbose and intimidating for new users. Like if you search up the cmd chmod in man pages, it will give you an intimidating response for newer users, at least in my prospective and opinion on it. I'm also using the BASH shell. I think I need to be more comfortable using man pages, which is why I think I need to just master the man page entirely. Do you all have any tips for me to improve my man page reading skill? Things I know: Man -k (Search for commands and command descriptions) Man Man (man the manual page) / to search in man page Synopsis : example of command
-
Hi, #!/bin/bash sourceFile="file.log" targetFile="2file.log" ping="1.1.2.3" while IFS='' read -r line || [[ -n "$line" ]]; do echo "allow-hotplug wlan0" > "$targetFile" echo "iface wlan0 inet static" >> "$targetFile" echo "address 192.168.0.2" >> "$targetFile" echo "netmask 255.255.255.252" >> "$targetFile" echo "wireless-channel 6" >> "$targetFile" echo "wireless-essid grewep" >> "$targetFile" echo "wireless-mode ad-hoc" >> "$targetFile" echo "$line" >> "$targetFile" ping -q -c 5 "$ping" ping2=$? if [ "$ping2" -ne 0 ]; then break fi sed -n -e '8p' "$targetFile" done < "$sourceFile" Is there a way to echo text, at the point of break in the if statement? Thank you
-
Hi, Currently, I've got the following to produce a random 13 character string, which includes all printable ASCII characters. #!/bin/bash LIST="a A b B c C d D e E f F g G h H i I j J k K l L m M n N o O p P q Q r R s S t T u U v V w W x X y Y z Z 0 1 2 3 4 5 6 7 8 9 ! £ $ % ^ & ( ) , . / ; ' # [ ] { } : @ ~ < > \ ? * + - = \" _ |" RAMPWD=$(cat /dev/urandom | tr -dc "$LIST" | fold -w 13 | head -n 1) echo "$RAMPWD" The problem is that sometimes the output results into this: f~VfrI▒ocgU6[ which is useless for a WEP password and just doesn't work Is there any other random generator for bash that I could use and still include all printable ASCII characters. Thank you
-
Hi, I'm trying to copy a file from: ~/.ssh/ but everytime I run the script it keeps saying pi@raspberrypi:/etc/greenwich $ ./copybash.sh cat: ~/.ssh/testfilegen2.log: No such file or directory Any Suggestions? Thank you
- 3 replies
-
- bash script
- linux
-
(and 1 more)
Tagged with:
-
Hi, I've tried the following Crontab # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/etc/greenwich # m h dom mon dow user command */10 * * * * /etc/greenwich/gentest.sh 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # Bash Script #!/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/etc/greenwich targetFile="testfilegen2.log" address="192.168.1.1" netmask="255.255.255.0" channel="1" essid="GreRPi" random=$(pwgen 13 -1) sudo echo "source-directory /etc/network/interfaces.d" > "$targetFile" sudo echo "auto lo" >> "$targetFile" sudo echo "auto wlan0" >> "$targetFile" sudo echo "allow-hotplug wlan0" >> "$targetFile" sudo echo "iface wlan0 inet static" >> "$targetFile" sudo echo "address $address" >> "$targetFile" sudo echo "netmask $netmask" >> "$targetFile" sudo echo "wireless-channel $channel" >> "$targetFile" sudo echo "wireless-essid $essid" >> "$targetFile" sudo echo "wireless-mode ad-hoc" >> "$targetFile" sudo echo "wireless-key s:$random" >> "$targetFile" scp testfilegen2.log pi@192.168.1.1:~/.ssh/ sudo service networking restart And cron still doesn't automatically run the bash script every 10 mins Any suggestions? Thank you
-
Hi The below bash script runs every 10 mins on L1 and within the script is meant to generate a random password, then print that into a file, which is then copied to L2. #!/bin/bash targetFile="testfilegen2.log" address="192.168.1.1" netmask="255.255.255.0" channel="1" essid="GreRPi" random=$(pwgen 13 -1) sudo echo "source-directory /etc/network/interfaces.d" > "$targetFile" sudo echo "auto lo" >> "$targetFile" sudo echo "auto wlan0" >> "$targetFile" sudo echo "allow-hotplug wlan0" >> "$targetFile" sudo echo "iface wlan0 inet static" >> "$targetFile" sudo echo "address $address" >> "$targetFile" sudo echo "netmask $netmask" >> "$targetFile" sudo echo "wireless-channel $channel" >> "$targetFile" sudo echo "wireless-essid $essid" >> "$targetFile" sudo echo "wireless-mode ad-hoc" >> "$targetFile" sudo echo "wireless-key s:$random" >> "$targetFile" sleep 1 scp "$targetFile" pi@192.168.1.1:~/.ssh/ sudo service networking restart Unfornaltey L1 doesn't seem to recieve the new password but L2 does. L1 Output pi@raspberrypi:/etc/greenwich $ cat testfilegen2.log source-directory /etc/network/interfaces.d auto lo auto wlan0 allow-hotplug wlan0 iface wlan0 inet static address 192.168.1.1 netmask 255.255.255.0 wireless-channel 1 wireless-essid GreRPi wireless-mode ad-hoc wireless-key s:she5Bie1ojoon L2 Output pi@raspberrypi:~/.ssh $ cat testfilegen2.log source-directory /etc/network/interfaces.d auto lo auto wlan0 allow-hotplug wlan0 iface wlan0 inet static address 192.168.1.1 netmask 255.255.255.0 wireless-channel 1 wireless-essid GreRPi wireless-mode ad-hoc wireless-key s:ez2eeCeich0oc Any Suggestions? Thank you
- 3 replies
-
- cron
- bash script
-
(and 4 more)
Tagged with:
-
Hi, I've currently got 2 bash scripts within crontab # m h dom mon dow command */10 * * * * /etc/greenwich/grerpi.sh */10 * * * * /etc/greenwich/newrpi.sh but it only runs the grerpi.sh bash script grerpi.sh #!/bin/bash targetFile="/etc/network/grerpi" address="192.168.1.1" netmask="255.255.255.0" channel="1" essid="GreRPi" password="/etc/greenwich/pswfile.log" random=$(pwgen 13 -1) { echo "$random" } | sudo tee "$password" > /dev/null { echo "source-directory /etc/network/interfaces.d" echo "auto lo" echo "auto wlan0" echo "allow-hotplug wlan0" echo "iface wlan0 inet static" echo "address $address" echo "netmask $netmask" echo "wireless-channel $channel" echo "wireless-essid $essid" echo "wireless-mode ad-hoc" echo "wireless-key s:$random" } | sudo tee "$targetFile" > /dev/null scp "$targetFile" pi@192.168.1.1:~/.ssh/ newpi.shi !/bin/bash targetFile="/etc/network/interfaces2" address="192.168.1.2" netmask="255.255.255.0" channel="1" essid="GreRPi" password=$(sudo cat "/etc/greenwich/pswfile.log") { echo "source-directory /etc/network/interfaces.d" echo "auto lo" echo "auto wlan0" echo "allow-hotplug wlan0" echo "iface wlan0 inet static" echo "address $address" echo "netmask $netmask" echo "wireless-channel $channel" echo "wireless-essid $essid" echo "wireless-mode ad-hoc" echo "wireless-key s:$password" } | sudo tee "$targetFile" > /dev/null sudo service networking restart Any Suggestions? Thank you
- 6 replies
-
- cron
- bash script
-
(and 4 more)
Tagged with:
-
Hi, I keep getting permission denied everytime I enter the password when requested from scp Even though the password both the source and destination machine is still raspberry Thank you
-
Hi, Is there a way one a Linux system to block a connection with another device, if the Linux systems receives to many ping requests? Thank you
-
Hi, !/bin/bash sourceFile="file.log" targetFile="/etc/network/interfaces" numLines="$(wc -l < ${sourceFile})" counter=1 lineNumber=1 if (( counter >= "$numLines" )) || [[ ! -f "${sourceFile}" ]]; then echo "invalid file" >82; exit 1 fi while [ "$counter" -le "$numLines" ]; do echo "allow-hotplug wlan0" > "$targetFile" echo "iface wlan0 inet static" >> "$targetFile" echo "address 192.168.0.2" >> "$targetFile" echo "netmask 255.255.255.252" >> "$targetFile" echo "wireless-channel 6" >> "$targetFile" echo "wireless-essid grewep" >> "$targetFile" echo "wireless-mode ad-hoc" >> "$targetFile" awk '{print "wireless-key s:",$0}' "$sourceFile" >> "$targetFile" counter=$((counter + 1)) done With the above code, how would I print a permutation, then delete it, then print the next permutation, automatically in the bash script? Thank you
-
Hi, Is there a way to create a bash script, in which it will either block connection from the attacker, if so many ping requests have been received block everything, if so many requests have been received Thank you
- 4 replies
-
- brute force
- bash
-
(and 3 more)
Tagged with:
-
Hi, With the below code, if I wanted to increment this, so once it has done the first it moves down to the next line, would it be better to use a for loop or a while loop: #!/bin/bash LINE=3 ( head -1 file2.log head -${LINE} file1.log | tail -1 tail --lines=+2 file2.log ) > file2.new mv file2.log file2.old mv file2.new file2.log Thank you
- 6 replies
-
- bash script
- linux
-
(and 1 more)
Tagged with:
-
Hi, I'm trying to increment the following code to line 2 on file2.log, as I would like it to automatically print each line from file1.log, one at a time: #!/bin/bash let "LINE++" ( head -1 file2.log head -${LINE} file1.log | tail -1 tail --lines=+2 file2.log ) > file2.new mv file2.log file2.old mv file2.new file2.log How could this be done? Thank you
- 15 replies
-
- bash script
- linux
-
(and 2 more)
Tagged with:
-
Hi, With the below code, I'm trying to echo "line" onto the same output but all i get is: #!/bin/bash LINE=3 ( head -1 file2.log head -${LINE} file1.log | tail -1 echo "line" tail --lines=+2 file2.log ) > file2.new The echo "line" is printed under the output from file1.log which is '3'. 1 3 line 2 3 4 5 6 7 8 9 10 How can I echo "line" onto the same line as the output? Thank you
- 1 reply
-
- bash script
- linux
-
(and 2 more)
Tagged with:
-
bash script Bash Script - Copying and Printing to a specific line?
spbr posted a topic in Programming
Hi, I understand on how to copy a specific line, but is it possible to print to a specific line? If so, how? Thank you -
Hi everyone. I'm going to college for Computer Science, with a focus on Computer Programming. I'm in several classes this semester, which have had me deem this the semester of Unix/Linux. I own 2 PC's, one custom built desktop and an MSI GS73 laptop. Both of these are obviously Windows based machines. In two of my classes, the professors are wanting us to program/code in a Unix environment. Our computer labs are all Macs. I don't own any, and don't want to live in the computer lab. I am wondering, from those with experience, would I be better off dual booting at least my laptop with Linux and Windows, or should I use Virtual Box or some other program? My one class, we are specifically coding with Haskell, where as the other one I'm not too entirely sure, but it appears to be C++, and the professor is having us do it all through Unix terminal. So, dual boot or virtual environment? If virtual, is there something better than VirtualBox? I've had dual boot before, but it did mess up my Windows boot options. If there are tricks to make dual boot better (if its preferred), please let me know. Also, is there a flavor of Linux that would be best for this? I didn't know if there was one that came with all of the required compilers for Java, Haskell, C++, and so on. I've had experience with Ubuntu, Kali, and a little bit of Mint. Any guidance, comments, and suggestions are accepted.
-
So long story short, I'm planning on upgrading my aging MacBook Pro's hard drive with an SSD. Upon doing some research, I've found that some drives done handle TRIM commands correctly on Linux (which I use for a lot of programming work) and likely also macOS (which is based on Unix and can enable TRIM on third-party drives via terminal commands). These drives are blacklisted in the Linux kernel. I'm now trying to understand what the subsequent "whitelist" block means when it says It then lists Intel SSDs among the whitelisted devices. Sandisk isn't listed in either the blacklist or whitelist. Does this mean that the it would be good for Linux, or that it just hasn't been tested? Tldr: I'm debating between an Intel 540s 1TB ($399) or a Sandisk Ultra II 960GB ($320) and want to know which one I should go with if I'll be using TRIM on macOS/Linux.
-
I've decided it's time to start learning some networking. So I'm going to build a pfSense router from an old Dell Optiplex (or similar). I was looking at the Level1 videos about it and I understand that what he had (an i5 Optiplex) is very much overkill. But should I really go with something as simple as a Core Duo or Pentium instead? What would be the best "bang for the buck" when it comes to buying a retired business-class computer for this project? TIA
-
Hi everyone, So, I'd like to buy a laptop in late-September/early-October for about $400. I know, that's a tight budget, but I'm currently 16 years old, and my parents aren't going to finance it, and that's the money I have. So I mainly do development in these languages/environments: Android Flutter Java(FX) Dart Unity or Unreal (not currently doing any development in these, but I want to try them when I have the time.) My main IDE is IntelliJ Idea, which I am running on Linux. As for distro, I am kinda used to Ubuntu based distros, and currently running elementaryOS, but I am trying other stuff as well. But if the laptop can be "Hackintoshed", that would be the icing on the cake. I won't be doing gaming on this laptop, I have my desktop for that. I need the battery to last at least about 4 hours, but ideally more. Having USB-C would be a benefit, but not a requirement. The laptop should have (at least) 8GBs of RAM, since I have a bad habit of using a ton of Chrome tabs while developing. Having an SSD would also be a huge bonus (otherwise I need to buy one separately). Second hand is certainly an option, but I live in Hungary, so factor in EU pricing and shipping, not US. I am not afraid of upgrading the RAM or changing the hard drive to an SSD, but I'm going to need to factor that in the cost as well. I am also not afraid of doing weird stuff (eg. buying a Chromebook and replacing the OS on it.). I know this is a lot from such a tight budget, but I hope there are options. So what are your recommendations? Thanks in advance.