why I am not copy different directories to another different directories in linux Posted: 25 Jun 2022 07:49 AM PDT foreach dir (pavan pavan_kumar) mkdir -p $ward/runs/$dir/$tech/release/latest/caliber_waiver/$dir_waiver_db cp -r pavan/Caliber/runs/$dir/$tech/release/latest/caliber_waiver/$dir_waiver_db\ $ward/runs/$dir/1276.31/release/latest/caliber_waiver/$dir_waiver_db end |
How to change the system refresh rate from the command-line? Posted: 25 Jun 2022 07:25 AM PDT Projectors appear to typically support 24p playback (incl. 23.976Hz less commonly, it seems) — currently I'm manually toggling between 24Hz and 60Hz in the Gnome settings when switching from film or television content to a web video, for instance. A command would allow creating a toggle hotkey, similar to this Gnome 'night light' solution. |
Supress spammy discord log Posted: 25 Jun 2022 06:17 AM PDT Everytime I open discord (installed using deb package), my log always spammed with these kind of message every second: Jun 25 20:14:20 pop2104 gnome-shell[102661]: [2022-06-25 20:14:20.833] [102901] (device_info_linux.cc:45): NumberOfDevices Jun 25 20:14:20 pop2104 gnome-shell[102661]: [2022-06-25 20:14:20.950] [102901] (device_info_linux.cc:45): NumberOfDevices Jun 25 20:14:20 pop2104 gnome-shell[102661]: [2022-06-25 20:14:20.950] [102901] (device_info_linux.cc:78): GetDeviceName note: previously was using flatpak version of discord, and it has similar problem How to suppress this? |
wine32 installation error on ubuntu 22.04 github actions Posted: 25 Jun 2022 06:15 AM PDT I'm trying to install wine32 on ubuntu 22.04 (github actions) but I'm getting this error: apt : Depends: libapt-pkg6.0 (>= 2.4.5) but it is not going to be installed Depends: libsystemd0 but it is not installable bsdutils : PreDepends: libsystemd0 but it is not installable init : PreDepends: systemd-sysv shim-signed : Depends: grub-efi-amd64-signed but it is not going to be installed or grub-efi-arm64-signed but it is not installable Depends: grub2-common (>= 2.04-1ubuntu24) util-linux : PreDepends: libsystemd0 but it is not installable PreDepends: libudev1 (>= 183) but it is not installable E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. Workflow: name: Release Build on: push: tags: - 'v*' jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '14' cache: 'yarn' - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v2 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install build dependencies run: | sudo dpkg --add-architecture i386 sudo apt update sudo apt install software-properties-common apt-transport-https wget -y wget -nc https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources sudo mv winehq-jammy.sources /etc/apt/sources.list.d/ wget -nc https://dl.winehq.org/wine-builds/winehq.key sudo mv winehq.key /usr/share/keyrings/winehq-archive.key echo "APT::Get::Always-Include-Phased-Updates \"1\";" > sudo tee /etc/apt/apt.conf.d/99phased-updates sudo apt update sudo apt install --install-recommends wine-stable wine32 sudo apt install gnupg ca-certificates sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list sudo apt update sudo apt install mono-devel sudo apt install --no-install-recommends -y libopenjp2-tools sudo apt install --no-install-recommends -y rpm sudo apt install --no-install-recommends -y libarchive-tools - name: Build & release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: pwsh run: | $sha = (git rev-parse --short HEAD) yarn --silent $env:SHORT_SHA=$sha; yarn release - name: Move artifacts id: vars shell: pwsh run: | $sha = (git rev-parse --short HEAD) md -p ./dist/artifacts Copy-Item ./dist/*.exe -Destination ./dist/artifacts/ Copy-Item ./dist/*.deb -Destination ./dist/artifacts/ Copy-Item ./dist/*.tar.gz -Destination ./dist/artifacts/ $file = Get-ChildItem -Path ./dist/artifacts/ -Filter "*.tar.gz" | select-object -first 1 $newName = "$($file.BaseName).$($sha)$($file.Extension)" Rename-Item -Path $file.FullName -NewName $newName $file = Get-ChildItem -Path ./dist/artifacts/ -Filter "*.exe" | select-object -first 1 $newName = "$($file.BaseName).$($sha)$($file.Extension)" Rename-Item -Path $file.FullName -NewName $newName $file = Get-ChildItem -Path ./dist/artifacts/ -Filter "*.deb" | select-object -first 1 $newName = "$($file.BaseName).$($sha)$($file.Extension)" Rename-Item -Path $file.FullName -NewName $newName - name: Upload artifacts uses: actions/upload-artifact@v1.0.0 with: name: ChampR path: "./dist/artifacts" # - name: Create Release # id: create_release # uses: actions/create-release@v1 # env: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # with: # tag_name: ${{ github.ref }} # release_name: ${{ github.ref }} # draft: false # prerelease: false # - name: Upload Release Assets # id: upload_release_assets # uses: actions/upload-release-asset@v1 # env: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # with: # upload_url: ${{ steps.create_release.outputs.upload_url }} # asset_path: ./dist/artifacts/${{ steps.vars.outputs.fileName }} # asset_name: ${{ steps.vars.outputs.fileName }} # asset_content_type: application/vnd.microsoft.portable-executable Does anyone know how to fix that ?? |
zsh: pass variable by reference, and modify its value (like bash's local -n namerefs)? Posted: 25 Jun 2022 07:49 AM PDT |
capsh works but systemd doesn't - Openvpn unprivileged user Posted: 25 Jun 2022 06:49 AM PDT OS: Debian 11 Package: OpenVPN 2.5.1 Background: After an update, Openvpn-2.5 clients can no longer use iproute to modify the interface and configure routes pushed by the OpenVPN server after root privileges are dropped and the system unit running as an unprivileged user. Based on discussions in these two threads on the iproute issue: https://bugs.archlinux.org/task/68480 https://phabricator.vyos.net/T3805 A workaround was suggested to remove user & group directives from /etc/openvpn/openvpn.conf and to add Ambient Capabilities, User=tunnel , Group=tunnel to a separate .service file. There is already an existing Openvpn service file (openvpn@openvpn.service) in /lib/systemd/system so we created a new directory and included a .service file in it - /lib/systemd/system/openvpn@openvpn.service.d/override.conf # separate service file containing User and group directives along with Ambient capabilities [Service] User=tunnel Group=tunnel SecureBits=keep-caps ExecStartPre=/usr/bin/sudo --non-interactive /usr/sbin/openvpn --rmtun --dev tun0 ExecStartPre=/usr/bin/sudo --non-interactive /usr/sbin/openvpn --mktun --dev tun0 --dev-type tun --user tunnel --group tunnel ExecStopPost=/usr/bin/sudo --non-interactive /usr/sbin/openvpn --rmtun --dev tun0 AmbientCapabilities=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE CAP_AUDIT_WRITE Ran the following commands: sudo systemctl daemon-reload sudo chown -R tunnel:tunnel /etc/openvpn /run/openvpn sudo /usr/sbin/openvpn --rmtun --dev tun0 sudo /usr/sbin/openvpn --mktun --dev tun0 --dev-type tun --user tunnel --group tunnel cd /etc/openvpn/ sudo -u tunnel openvpn /etc/openvpn/openvpn.conf Error The expectation was that the unprivileged User=tunnel will have the ambient capabilities to open up tun0 and modify the interface to complete the openvpn connection. However, it encountered an error. #Error after running sudo -u tunnel openvpn /etc/openvpn/openvpn.conf 2022-06-24 17:32:08 us=174691 TUN/TAP device tun0 opened 2022-06-24 17:32:08 us=174755 do_ifconfig, ipv4=1, ipv6=0 2022-06-24 17:32:08 us=174844 net_iface_mtu_set: mtu 1500 for tun0 2022-06-24 17:32:08 us=175005 sitnl_send: rtnl: generic error (-1): Operation not permitted 2022-06-24 17:32:08 us=175084 Linux can't set mtu (1500) on tun0 2022-06-24 17:32:08 us=175142 Exiting due to fatal error The solution that works However, with capsh, I gave Ambient Capability directly to the Openvpn executable with user=tunnel privileges, and nothing in the systemd service: sudo /sbin/capsh --keep=1 --user='tunnel' --inh='cap_ipc_lock,cap_net_admin,cap_net_bind_service,cap_net_raw,cap_setgid,cap_setuid,cap_sys_chroot,cap_dac_override,cap_audit_write' --addamb='cap_ipc_lock,cap_net_admin,cap_net_bind_service,cap_net_raw,cap_setgid,cap_setuid,cap_sys_chroot,cap_dac_override,cap_audit_write' -- -c 'openvpn /etc/openvpn/openvpn.conf' The issue: Why wasn't systemd able to set the Ambient Capabilities for user=tunnel whereas capsh was able to? How to make this work with systemd? |
CentOS Master Boot Record Overwritten Posted: 25 Jun 2022 07:48 AM PDT On my CentOS 7.7 box, I installed another drive and installed AlmaLinux 9 . Things went wrong at that point. I thought I could just use the BIOS to choose which OS I wanted to load. Isn't the case as apparently the Master Boot Record is overwritten. I've reinstalled the grub: /sbin/grub2-install /dev/sda Now when it boots up, it ends up with the grub prompt. I thought it would grab the volume from /etc/fstab and just load up. grub> How can I get this to work again? I've not found anything that would suggest what needs to be changed to load the OS. Any insight appreciated. Cheers Further info/feedback: I think this is going the wrong way. What I want to do is to completely avoid Alma for the moment. If I had known the installation of that option has caused trouble, then I wouldn't have done it. I want to get this server back to its original state. I don't know what happened, as I haven't changed anything on my CentOS7 system. So let's extricate Alma from the picture. I might move there in the future. I have an SSD that I'm loading up via USB , same version of CentOS 7.7 v2003 . |
Use of makefile varriable in Batch script [closed] Posted: 25 Jun 2022 06:33 AM PDT I have a variable in my makefile (mybuild.mak ). The makefile has a variable. i.e BUILD_PATH = D:/<some path> The variable BUILD_PATH is to be used in a batch file (RunTest.bat ). How to use the makefile variable's value in the batch file? |
Finding the line number of first occurrence of a text in bash script Posted: 25 Jun 2022 07:46 AM PDT I need to find out what is the line number of first occurrence of a given search string that should be in the start of a line in a text file and store it in a variable in my bash script. For example I want to find the first occurrence of "c": abc bde cddefefef // this is the line that I need its line number Casdasd // C here is capital, I dont need it azczxczxc b223r23r2fe Cssdfsdfsdf dccccdcdcCCDcdccCCC eCCCCCC I came up with this but as you see there are big problems trimLineNum=$(cat "${varFileLog}" | grep -m1 -n "c") echo "c is at line #"${trimLineNum} The output will be: c is at line #1:abc Problems: - So obviously it matches the first line, because there is a "c" in the line.
- The output will also include the content of the line as well! I want it to be just the number of the line
what should I change to fix those problems? |
netstat -lnp outputing results without PID Posted: 25 Jun 2022 05:51 AM PDT After using netstat -lnp I wonder how comes some of the result don't show any PID/Program name? Should I be worried? See below: Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:33223 0.0.0.0:* LISTEN 31952/dart tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN 13351/adb tcp 0 0 127.0.0.1:41741 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:5939 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:5433 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:5434 0.0.0.0:* LISTEN - tcp6 0 0 ::1:33223 :::* LISTEN 31952/dart tcp6 0 0 127.0.0.1:63342 :::* LISTEN 1061/java tcp6 0 0 ::1:631 :::* LISTEN - tcp6 0 0 127.0.0.1:8599 :::* LISTEN 1061/java tcp6 0 0 :::25 :::* LISTEN - tcp6 0 0 127.0.0.1:6942 :::* LISTEN 1061/java udp 0 0 224.0.0.251:5353 0.0.0.0:* 26664/chrome udp 0 0 224.0.0.251:5353 0.0.0.0:* 26664/chrome udp 0 0 224.0.0.251:5353 0.0.0.0:* 26705/chrome --type udp 0 0 127.0.0.53:53 0.0.0.0:* - udp 0 0 0.0.0.0:68 0.0.0.0:* - udp 0 0 0.0.0.0:631 0.0.0.0:* - raw6 0 0 :::58 :::* 7 - I have identified some of them: - Port _621: Printing
- Port 5939: Teamviewer
- Port 5433 and 5434: PostgresQL
|
No sound from speakers/headphones and no Mic on iMac 2019 (18,3) running Linux Posted: 25 Jun 2022 06:00 AM PDT My 2019 iMac (18,3) has no sound through the speakers/headphones and no Mic when running Linux: it works as expected on OSX. I am posting here because this appears to be a Linux issue, as I have three different distros installed -- Manjaro (kernel 5.6-x86_64 (though I have tried 6.0 too)); Fedora 31 (kernel 5.1.20-300); and Ubuntu 19.10 (kernel 5.3.0-45-generic) -- and none of them produce sound or record it from the mic. The Audio Device from lspci is Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31) . It also appears to control the PCI Bridge and the USB controller. I have posted more information here. I have looked at both pavucontrol and alsamixer , but have found nothing to suggest that the operating systems don't think the Audio Device is working. It's just that no sound comes out. In pavucontrol , the Configuration is set to HDMI off, and Built-in Audio as Analog Stereo Duplex -- though none of them change the outcome. In alsamixer , the Chip is identified as Cirrus Logic Generic , which is incorrect, and there are no speaker/headphone/anything columns other than PCH. As suggested in this thread, I tried to fiddle with /etc/modprobe.d/modprobe.conf by adding options snd_hda_intel model=intel-mac-auto and various other iterations (e.g., options snd_hda_intel model=imac27 see here for why). Installing XFCE and modifying the settings there did not work for me. There are similar posts about not getting sound of of the newer (post-2017) iMacs, which can best be found by just searching Google with snd-hda-intel imac 18,3 . That the problem spans all distros (Fedora; LinuxMint; Ubuntu; Manjaro) suggests a kernel or driver issue. Any idea either (A) how to fix or (B) where I can post this get someone to build this audio device into the kernel?? Adding dmesg . There are no recent journalctl entries related to sound. This is for Manjaro 20.0 running 5.6.5-1-MANJARO. [ 0.315571] Modules linked in: [ 0.315572] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.6.5-1-MANJARO #1 [ 0.315573] Hardware name: Apple Inc. iMac18,3/Mac-BE088AF8C5EB4FA2, BIOS 181.0.0.0.0 01/31/2020 [ 0.315574] RIP: 0010:acpi_ec_add.cold+0xe3/0x105 [ 0.315580] Call Trace: [ 0.315582] acpi_device_probe+0x47/0x1d0 [ 0.315583] really_probe+0x147/0x3c0 [ 0.315584] driver_probe_device+0xb6/0x100 [ 0.315585] ? driver_allows_async_probing+0x50/0x50 [ 0.315586] bus_for_each_drv+0x8f/0xd0 [ 0.315587] __device_attach+0xf0/0x170 [ 0.315588] ? acpi_sleep_proc_init+0x24/0x24 [ 0.315589] acpi_bus_register_early_device+0x4a/0x70 [ 0.315591] acpi_ec_init+0x17c/0x1a8 [ 0.315592] acpi_init+0x2d4/0x33a [ 0.315594] do_one_initcall+0x59/0x240 [ 0.315596] kernel_init_freeable+0x1b2/0x214 [ 0.315597] ? rest_init+0xbf/0xbf [ 0.315598] kernel_init+0xa/0x101 [ 0.315599] ret_from_fork+0x35/0x40 [ 0.315600] ---[ end trace 73e60983eec368c9 ]--- [ 0.315625] iommu: Default domain type: Translated [ 0.315633] pci 0000:01:00.0: vgaarb: VGA device added: decodes=io+mem,owns=none,locks=none [ 0.315633] pci 0000:01:00.0: vgaarb: bridge control possible [ 0.315633] pci 0000:01:00.0: vgaarb: setting as boot device [ 0.315633] vgaarb: loaded [ 0.315769] SCSI subsystem initialized [ 0.315778] libata version 3.00 loaded. [ 0.315778] ACPI: bus type USB registered [ 0.315778] usbcore: registered new interface driver usbfs [ 0.315778] usbcore: registered new interface driver hub [ 0.315778] usbcore: registered new device driver usb [ 0.315778] pps_core: LinuxPPS API ver. 1 registered [ 0.315778] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.315778] PTP clock support registered [ 0.315778] EDAC MC: Ver: 3.0.0 [ 0.315937] Registered efivars operations [ 0.315937] PCI: Using ACPI for IRQ routing [ 0.334438] PCI: pci_cache_line_size set to 64 bytes [ 0.334886] NetLabel: Initializing [ 0.334887] NetLabel: domain hash size = 128 [ 0.334887] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO [ 0.334895] NetLabel: unlabeled traffic allowed by default [ 0.334898] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0 [ 0.334898] hpet0: 8 comparators, 64-bit 24.000000 MHz counter [ 0.336696] clocksource: Switched to clocksource tsc-early [ 0.343575] *** VALIDATE bpf *** [ 0.343634] VFS: Disk quotas dquot_6.6.0 [ 0.343643] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.343663] *** VALIDATE ramfs *** [ 0.343665] *** VALIDATE hugetlbfs *** [ 0.343692] pnp: PnP ACPI init [ 0.344068] system 00:00: [mem 0xfed00000-0xfed03fff] has been reserved [ 0.344072] system 00:00: Plug and Play ACPI device, IDs PNP0103 PNP0c01 (active) [ 0.344102] system 00:01: [io 0xffff] has been reserved [ 0.344103] system 00:01: [io 0x1800-0x18fe] has been reserved [ 0.344104] system 00:01: [io 0x0800-0x087f] has been reserved [ 0.344106] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.344119] pnp 00:02: Plug and Play ACPI device, IDs PNP0b00 (active) [ 0.344282] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.344385] pnp: PnP ACPI: found 4 devices [ 0.345184] pci 0000:01:00.0: assigning 79 device properties [ 0.345212] pci 0000:07:00.0: assigning 8 device properties [ 0.345217] pci 0000:00:1f.3: assigning 4 device properties [ 0.345221] apple-properties: device path parse error -19 at 0x14: [ 0.345222] apple-properties: 00000000: 52 00 00 00 01 00 00 00 02 01 0c 00 d0 41 03 0a R............A.. [ 0.345223] apple-properties: 00000010: 00 00 00 00 01 01 06 00 00 02 7f ff 04 00 2c 00 ..............,. [ 0.345224] apple-properties: 00000020: 00 00 41 00 41 00 50 00 4c 00 2c 00 69 00 67 00 ..A.A.P.L.,.i.g. [ 0.345224] apple-properties: 00000030: 2d 00 70 00 6c 00 61 00 74 00 66 00 6f 00 72 00 -.p.l.a.t.f.o.r. [ 0.345225] apple-properties: 00000040: 6d 00 2d 00 69 00 64 00 00 00 08 00 00 00 03 00 m.-.i.d......... [ 0.345225] apple-properties: 00000050: 12 59 .Y [ 0.349746] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 0.349769] pci 0000:06:01.0: bridge window [io 0x1000-0x0fff] to [bus 09-41] add_size 1000 [ 0.349770] pci 0000:06:02.0: bridge window [io 0x1000-0x0fff] to [bus 08] add_size 1000 [ 0.349772] pci 0000:06:02.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 08] add_size 200000 add_align 100000 [ 0.349773] pci 0000:06:04.0: bridge window [io 0x1000-0x0fff] to [bus 42-7a] add_size 1000 [ 0.349774] pci 0000:05:00.0: bridge window [io 0x1000-0x0fff] to [bus 06-7a] add_size 3000 [ 0.349784] pci 0000:00:1f.3: BAR 4: assigned [mem 0x90000000-0x9000ffff 64bit] [ 0.349793] pci 0000:00:01.0: PCI bridge to [bus 01] [ 0.349795] pci 0000:00:01.0: bridge window [io 0x3000-0x3fff] [ 0.349796] pci 0000:00:01.0: bridge window [mem 0x92600000-0x926fffff] [ 0.349798] pci 0000:00:01.0: bridge window [mem 0xc0000000-0xd01fffff 64bit pref] [ 0.349800] pci 0000:00:1b.0: PCI bridge to [bus 02] [ 0.349805] pci 0000:00:1b.0: bridge window [mem 0x92500000-0x925fffff] [ 0.349810] pci 0000:00:1c.0: PCI bridge to [bus 03] [ 0.349814] pci 0000:00:1c.0: bridge window [mem 0x92000000-0x924fffff] [ 0.349819] pci 0000:00:1c.1: PCI bridge to [bus 04] [ 0.349823] pci 0000:00:1c.1: bridge window [mem 0xd0200000-0xd02fffff 64bit pref] [ 0.349827] pci 0000:05:00.0: BAR 13: assigned [io 0x5000-0x7fff] [ 0.349830] pci 0000:06:02.0: BAR 15: no space for [mem size 0x00200000 64bit pref] [ 0.349831] pci 0000:06:02.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref] [ 0.349832] pci 0000:06:01.0: BAR 13: assigned [io 0x5000-0x5fff] [ 0.349833] pci 0000:06:02.0: BAR 13: assigned [io 0x6000-0x6fff] [ 0.349833] pci 0000:06:04.0: BAR 13: assigned [io 0x7000-0x7fff] [ 0.349835] pci 0000:06:02.0: BAR 15: no space for [mem size 0x00200000 64bit pref] [ 0.349836] pci 0000:06:02.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref] [ 0.349837] pci 0000:06:00.0: PCI bridge to [bus 07] [ 0.349841] pci 0000:06:00.0: bridge window [mem 0x92900000-0x929fffff] [ 0.349847] pci 0000:06:01.0: PCI bridge to [bus 09-41] [ 0.349849] pci 0000:06:01.0: bridge window [io 0x5000-0x5fff] [ 0.349853] pci 0000:06:01.0: bridge window [mem 0x92a00000-0x999fffff] [ 0.349856] pci 0000:06:01.0: bridge window [mem 0xd0300000-0xd72fffff 64bit pref] [ 0.349861] pci 0000:08:00.0: BAR 0: assigned [mem 0x92800000-0x9280ffff] [ 0.349865] pci 0000:06:02.0: PCI bridge to [bus 08] [ 0.349866] pci 0000:06:02.0: bridge window [io 0x6000-0x6fff] [ 0.349870] pci 0000:06:02.0: bridge window [mem 0x92800000-0x928fffff] [ 0.349877] pci 0000:06:04.0: PCI bridge to [bus 42-7a] [ 0.349878] pci 0000:06:04.0: bridge window [io 0x7000-0x7fff] [ 0.349882] pci 0000:06:04.0: bridge window [mem 0x99a00000-0xa09fffff] [ 0.349885] pci 0000:06:04.0: bridge window [mem 0xd7300000-0xde2fffff 64bit pref] [ 0.349889] pci 0000:05:00.0: PCI bridge to [bus 06-7a] [ 0.349891] pci 0000:05:00.0: bridge window [io 0x5000-0x7fff] [ 0.349895] pci 0000:05:00.0: bridge window [mem 0x92800000-0xa09fffff] [ 0.349897] pci 0000:05:00.0: bridge window [mem 0xd0300000-0xde2fffff 64bit pref] [ 0.349902] pci 0000:00:1c.4: PCI bridge to [bus 05-7a] [ 0.349903] pci 0000:00:1c.4: bridge window [io 0x5000-0x8fff] [ 0.349906] pci 0000:00:1c.4: bridge window [mem 0x92800000-0xa09fffff] [ 0.349907] pci 0000:00:1c.4: bridge window [mem 0xd0300000-0xde2fffff 64bit pref] [ 0.349911] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window] [ 0.349912] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window] [ 0.349913] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window] [ 0.349913] pci_bus 0000:00: resource 7 [mem 0x000c0000-0x000c3fff window] [ 0.349914] pci_bus 0000:00: resource 8 [mem 0x000c4000-0x000c7fff window] [ 0.349915] pci_bus 0000:00: resource 9 [mem 0x000c8000-0x000cbfff window] [ 0.349916] pci_bus 0000:00: resource 10 [mem 0x000cc000-0x000cffff window] [ 0.349916] pci_bus 0000:00: resource 11 [mem 0x000d0000-0x000d3fff window] [ 0.349917] pci_bus 0000:00: resource 12 [mem 0x000d4000-0x000d7fff window] [ 0.349918] pci_bus 0000:00: resource 13 [mem 0x000d8000-0x000dbfff window] [ 0.349919] pci_bus 0000:00: resource 14 [mem 0x000dc000-0x000dffff window] [ 0.349919] pci_bus 0000:00: resource 15 [mem 0x000e0000-0x000e3fff window] [ 0.349920] pci_bus 0000:00: resource 16 [mem 0x000e4000-0x000e7fff window] [ 0.349921] pci_bus 0000:00: resource 17 [mem 0x000e8000-0x000ebfff window] [ 0.349921] pci_bus 0000:00: resource 18 [mem 0x000ec000-0x000effff window] [ 0.349922] pci_bus 0000:00: resource 19 [mem 0x000f0000-0x000fffff window] [ 0.349923] pci_bus 0000:00: resource 20 [mem 0x90000000-0xfeafffff window] [ 0.349924] pci_bus 0000:01: resource 0 [io 0x3000-0x3fff] [ 0.349924] pci_bus 0000:01: resource 1 [mem 0x92600000-0x926fffff] [ 0.349925] pci_bus 0000:01: resource 2 [mem 0xc0000000-0xd01fffff 64bit pref] [ 0.349926] pci_bus 0000:02: resource 1 [mem 0x92500000-0x925fffff] [ 0.349927] pci_bus 0000:03: resource 1 [mem 0x92000000-0x924fffff] [ 0.349928] pci_bus 0000:04: resource 2 [mem 0xd0200000-0xd02fffff 64bit pref] [ 0.349928] pci_bus 0000:05: resource 0 [io 0x5000-0x8fff] [ 0.349929] pci_bus 0000:05: resource 1 [mem 0x92800000-0xa09fffff] [ 0.349930] pci_bus 0000:05: resource 2 [mem 0xd0300000-0xde2fffff 64bit pref] [ 0.349931] pci_bus 0000:06: resource 0 [io 0x5000-0x7fff] [ 0.349931] pci_bus 0000:06: resource 1 [mem 0x92800000-0xa09fffff] [ 0.349932] pci_bus 0000:06: resource 2 [mem 0xd0300000-0xde2fffff 64bit pref] [ 0.349933] pci_bus 0000:07: resource 1 [mem 0x92900000-0x929fffff] [ 0.349934] pci_bus 0000:09: resource 0 [io 0x5000-0x5fff] [ 0.349934] pci_bus 0000:09: resource 1 [mem 0x92a00000-0x999fffff] [ 0.349935] pci_bus 0000:09: resource 2 [mem 0xd0300000-0xd72fffff 64bit pref] [ 0.349936] pci_bus 0000:08: resource 0 [io 0x6000-0x6fff] [ 0.349936] pci_bus 0000:08: resource 1 [mem 0x92800000-0x928fffff] [ 0.349937] pci_bus 0000:42: resource 0 [io 0x7000-0x7fff] [ 0.349938] pci_bus 0000:42: resource 1 [mem 0x99a00000-0xa09fffff] [ 0.349938] pci_bus 0000:42: resource 2 [mem 0xd7300000-0xde2fffff 64bit pref] [ 0.350028] NET: Registered protocol family 2 [ 0.350113] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear) [ 0.350142] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.350244] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear) [ 0.350293] TCP: Hash tables configured (established 65536 bind 65536) [ 0.350321] UDP hash table entries: 4096 (order: 5, 131072 bytes, linear) [ 0.350337] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear) [ 0.350384] NET: Registered protocol family 1 [ 0.350387] NET: Registered protocol family 44 [ 0.350591] pci 0000:01:00.1: D0 power state depends on 0000:01:00.0 [ 0.350911] pci 0000:08:00.0: enabling device (0000 -> 0002) [ 0.350982] PCI: CLS 256 bytes, default 64 [ 0.351009] Trying to unpack rootfs image as initramfs... [ 0.505437] Freeing initrd memory: 14080K [ 0.529021] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) [ 0.529025] software IO TLB: mapped [mem 0x70f70000-0x74f70000] (64MB) [ 0.529159] check: Scanning for low memory corruption every 60 seconds [ 0.529386] Initialise system trusted keyrings [ 0.529393] Key type blacklist registered [ 0.529427] workingset: timestamp_bits=41 max_order=21 bucket_order=0 [ 0.530267] zbud: loaded [ 0.533625] Key type asymmetric registered [ 0.533625] Asymmetric key parser 'x509' registered [ 0.533631] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 0.533658] io scheduler mq-deadline registered [ 0.533658] io scheduler kyber registered [ 0.533676] io scheduler bfq registered [ 0.534693] pcieport 0000:06:01.0: pciehp: Slot #1 AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+ Interlock- NoCompl+ LLActRep+ [ 0.534856] pcieport 0000:06:02.0: pciehp: Slot #0 AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+ Interlock- NoCompl+ LLActRep+ [ 0.535037] pcieport 0000:06:04.0: pciehp: Slot #4 AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+ Interlock- NoCompl+ LLActRep+ [ 0.535159] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 [ 0.535205] efifb: probing for efifb [ 0.535244] efifb: No BGRT, not showing boot graphics [ 0.535245] efifb: framebuffer at 0xc0300000, using 32400k, total 32400k [ 0.535245] efifb: mode is 3840x2160x32, linelength=15360, pages=1 [ 0.535246] efifb: scrolling: redraw [ 0.535247] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0 [ 0.535273] fbcon: Deferring console take-over [ 0.535274] fb0: EFI VGA frame buffer device [ 0.535278] intel_idle: MWAIT substates: 0x142120 [ 0.535279] intel_idle: v0.4.1 model 0x9E [ 0.535462] intel_idle: lapic_timer_reliable_states 0xffffffff [ 0.535523] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0 [ 0.535539] ACPI: Power Button [PWRB] [ 0.535562] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1 [ 0.535574] ACPI: Sleep Button [SLPB] [ 0.535591] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2 [ 0.539080] ACPI: Power Button [PWRF] [ 0.539118] [Firmware Bug]: ACPI(GFX0) defines _DOD but not _DOS [ 0.539140] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no) [ 0.541040] acpi device:02: registered as cooling_device0 [ 0.541060] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/LNXVIDEO:00/input/input3 [ 0.545901] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.546305] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de> [ 0.546306] AMD-Vi: AMD IOMMUv2 functionality not available on this system [ 0.546874] nvme nvme0: pci function 0000:02:00.0 [ 0.546892] ahci 0000:00:17.0: version 3.0 [ 0.547089] ahci 0000:00:17.0: AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode [ 0.547091] ahci 0000:00:17.0: flags: 64bit ncq sntf pm led clo only pio slum part ems deso sadm sds apst [ 0.547310] scsi host0: ahci [ 0.547357] ata1: SATA max UDMA/133 abar m2048@0x9272b800 port 0x9272b900 irq 36 [ 0.547389] usbcore: registered new interface driver usbserial_generic [ 0.547392] usbserial: USB Serial support registered for generic [ 0.547406] rtc_cmos 00:02: RTC can wake from S4 [ 0.547874] rtc_cmos 00:02: registered as rtc0 [ 0.547883] rtc_cmos 00:02: alarms up to one month, y3k, 242 bytes nvram, hpet irqs [ 0.547915] intel_pstate: Intel P-state driver initializing [ 0.547926] intel_pstate: Disabling energy efficiency optimization [ 0.548439] intel_pstate: HWP enabled [ 0.548525] ledtrig-cpu: registered to indicate activity on CPUs [ 0.548740] intel_pmc_core intel_pmc_core.0: initialized [ 0.548801] drop_monitor: Initializing network drop monitor service [ 0.549267] NET: Registered protocol family 10 [ 0.570938] Segment Routing with IPv6 [ 0.570993] NET: Registered protocol family 17 [ 0.572066] RAS: Correctable Errors collector initialized. [ 0.572162] microcode: sig=0x906e9, pf=0x2, revision=0xca [ 0.572447] microcode: Microcode Update Driver: v2.2. [ 0.572456] IPI shorthand broadcast: enabled [ 0.572476] sched_clock: Marking stable (575440031, -3012466)->(575623611, -3196046) [ 0.572833] registered taskstats version 1 [ 0.572854] Loading compiled-in X.509 certificates [ 0.585212] Loaded X.509 cert 'Build time autogenerated kernel key: 97bd00d60515dad50e349ce022fedf2318a47e1b' [ 0.585284] zswap: loaded using pool lzo/zbud [ 0.585672] Key type ._fscrypt registered [ 0.585675] Key type .fscrypt registered [ 0.585677] Key type fscrypt-provisioning registered [ 0.606425] Key type big_key registered [ 0.608117] PM: Magic number: 0:338:456 [ 0.608159] mem urandom: hash matches [ 0.608388] rtc_cmos 00:02: setting system clock to 2020-04-19T00:28:17 UTC (1587256097) [ 0.862587] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300) [ 0.863553] ata1.00: unexpected _GTF length (8) [ 0.863844] ata1.00: ATA-9: APPLE HDD ST1000DM003, AQ04, max UDMA/133 [ 0.863850] ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 32) [ 0.865125] ata1.00: unexpected _GTF length (8) [ 0.865313] ata1.00: configured for UDMA/133 [ 1.518624] xhci_hcd 0000:00:14.0: xHCI Host Controller [ 1.518628] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1 [ 1.519685] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0000000001109810 [ 1.519693] xhci_hcd 0000:00:14.0: cache line size of 256 is not supported [ 14.349204] audit: type=1130 audit(1587256111.237:5): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-sysctl comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' [ 14.950800] audit: type=1130 audit(1587256111.837:6): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-sysusers comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' [ 15.791502] audit: type=1130 audit(1587256112.677:7): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup-dev comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' [ 15.791878] audit: type=1334 audit(1587256112.677:8): prog-id=5 op=LOAD [ 15.791936] audit: type=1334 audit(1587256112.677:9): prog-id=6 op=LOAD [ 17.215118] audit: type=1130 audit(1587256114.100:10): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journal-flush comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' [ 17.505882] audit: type=1130 audit(1587256114.394:11): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-udevd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' [ 17.681509] input: PC Speaker as /devices/platform/pcspkr/input/input22 [ 17.707721] i801_smbus 0000:00:1f.4: SPD Write Disable is set [ 17.707752] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt [ 18.164980] tg3.c:v3.137 (May 11, 2014) [ 18.179669] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 18.188593] RAPL PMU: API unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer [ 18.188594] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules [ 18.188594] RAPL PMU: hw unit of domain package 2^-14 Joules [ 18.188595] RAPL PMU: hw unit of domain dram 2^-14 Joules [ 18.188595] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules [ 18.202083] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 18.211346] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002) [ 18.211445] snd_hda_intel 0000:01:00.1: Force to non-snoop mode [ 18.272107] input: HDA ATI HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input23 [ 18.272137] input: HDA ATI HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input24 [ 18.272166] input: HDA ATI HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input25 [ 18.272260] input: HDA ATI HDMI HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input26 [ 18.272285] input: HDA ATI HDMI HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input27 [ 18.272310] input: HDA ATI HDMI HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input28 [ 18.272415] input: HDA ATI HDMI HDMI/DP,pcm=12 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input29 [ 18.281692] tg3 0000:04:00.0 eth0: Tigon3 [partno(BCM957766a) rev 57766001] (PCI Express) MAC address 68:sd:f7:0a:sd:43 [ 18.281694] tg3 0000:04:00.0 eth0: attached PHY is 57765 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1]) [ 18.281695] tg3 0000:04:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1] [ 18.281696] tg3 0000:04:00.0 eth0: dma_rwctrl[00000001] dma_mask[64-bit] [ 18.288242] snd_hda_codec_generic hdaudioC0D0: autoconfig for Generic: line_outs=2 (0x24/0x25/0x0/0x0/0x0) type:speaker [ 18.288244] snd_hda_codec_generic hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 18.288245] snd_hda_codec_generic hdaudioC0D0: hp_outs=1 (0x2c/0x0/0x0/0x0/0x0) [ 18.288245] snd_hda_codec_generic hdaudioC0D0: mono: mono_out=0x0 [ 18.288246] snd_hda_codec_generic hdaudioC0D0: inputs: [ 18.288247] snd_hda_codec_generic hdaudioC0D0: Internal Mic=0x45 [ 18.288247] snd_hda_codec_generic hdaudioC0D0: Mic=0x3c [ 18.318923] Linux agpgart interface v0.103 [ 18.466211] applesmc: key=769 fan=1 temp=97 index=93 acc=0 lux=2 kbd=0 [ 18.466312] applesmc applesmc.768: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info(). [ 18.469846] iTCO_vendor_support: vendor-support=0 [ 18.470145] usbcore: registered new interface driver brcmfmac [ 18.471326] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11 [ 18.471423] iTCO_wdt: unable to reset NO_REBOOT flag, device disabled by hardware/BIOS [ 18.576035] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43602-pcie for chip BCM43602/1 [ 18.660255] brcmfmac 0000:03:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.Apple Inc.-iMac18,3.txt failed with error -2 [ 18.660295] brcmfmac 0000:03:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2 [ 18.844334] intel_rapl_common: Found RAPL domain package [ 18.844339] intel_rapl_common: Found RAPL domain core [ 18.844342] intel_rapl_common: Found RAPL domain uncore [ 18.844345] intel_rapl_common: Found RAPL domain dram [ 18.895707] tg3 0000:04:00.0 enp4s0f0: renamed from eth0 [ 19.152077] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43602-pcie for chip BCM43602/1 [ 19.152112] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [ 19.152867] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43602/1 wl0: Nov 10 2015 06:38:10 version 7.35.177.61 (r598657) FWID 01-ea662a8c Adding kernel parameters: rw quiet acpi=off acpi_osi=!Darwin acpi_backlight=video mds=full,nosmt . Note that I tried with acpi=off added to these and also with acpi=off being the sole acpi parameter (i.e., not acpi_osi and not acpi_backlight , which fix the iMac not being able to sleep and no brightness controls, respectively). Still no sound. |
GLib-GObject-CRITICAL **: g_object_unref: assertion Error Got when using evnce comand to open pdf in linux Posted: 25 Jun 2022 07:01 AM PDT I have tried to open a pdf Using Evince Command but somehow i got this message "GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed " Help me to know more detail about this warning message |
How can I do an if conditional for a failure of a bash command? Posted: 25 Jun 2022 07:21 AM PDT I'd like to have a very simple condition that will only execute if the command fails. In this example it's a conditional based on the SUCCESS of the command. if command ; then echo "Command succeeded" fi I'd like the opposite - how can I do this? Is there a elagant way besides doing a comparison on $? I do not want to use the || or operator - it does semantically convey (in my opinion) the desired functionality. In the case of command || echo "command failed" . |
How do I change 'Paste' shortcut for Yakuake? Posted: 25 Jun 2022 06:49 AM PDT I wish to remap paste to control + v on Yakuake. I have already remapped the key in Konsole but Yakuake seems like its only sharing profile keybinding. (Found in Settings - Edit current profile - Shortcut tab) instead of 'Configure shortcuts' option. How can modify paste key on Yakuake? |
Mosh with port forwarding (like SSH) Posted: 25 Jun 2022 05:48 AM PDT When connecting to my development server via ssh , I can forward remote ports to local ports via: ssh my-user@example.com -L 5432:localhost:5432 However I'd rather use mosh because my connection tends to drop. I tried extending my usual mosh command (that works) with the --ssh parameter: mosh --ssh "ssh -L 5432:localhost:5432" my-user@example.com Which gets me connected without error - but doesn't do anything for my ports. Is there a way to make port forwarding work when connecting via mosh ? |
Booting stops at Loading initial ramdisk Posted: 25 Jun 2022 06:31 AM PDT I have installed Arch Linux on 40GB HDD on ga-g4mt-s2p1 Motherboard ( Intel Core 2 multi-core,2Gb of Ram) I have made 4 Partitions: /boot 100Mib Swap 4Gib / 20Gib /home The rest of the disk It runs well without any problems but when I try the hard on and older Motherboard p4p800-mx(Pentium 4,512 Mb of Ram) the booting stops at: loading linux loading initial ramdisk Edit:Before the Grub menu I have this message CMOS Settings Wrong CMOS Date/Time Not Set Press F1 to Run Setup Press F2 to load default value and continue |
Can sendmail include an attachment? Posted: 25 Jun 2022 06:36 AM PDT Is it possible to include an attachment with sendmail? I am generating the following emailfile.eml files with the following layout From: Company Name <mycompany@example.com> To: recipient@example.com CC: someoneelse@example.com Subject: Generated Output Mime-Version: 1.0 This will be the body copy even though it's terrible I am sending these emails using # /usr/sbin/sendmail -t < emailfile.eml This part is working file but I would like to include an attachment to this email. |
Using chown $USER:$USER inside bash script Posted: 25 Jun 2022 06:22 AM PDT In a small bash script I'm running I am attempting to chown a new directory that is created. I've added: sudo chown $USER:$USER /var/www/$sitename sudo chmod 775 /var/www/$sitename after the line where I mkdir (sudo mkdir /var/www/$sitename ). For some reason the chown is not executing. I can execute it manually but when written in the file it doesn't work. I have noticed that "chown" is not highlighted in the same color as "mkdir" and "chmod" but I can't figure out my problem. Why doesn't chown work here? Is it an issue with $USER:$USER ? EDIT Here is the full script. How would I chown the file to whichever non root user executed the script? #!/bin/sh #!/bin/bash # New Site cd /etc/apache2/sites-available/ echo "New site name (test.my):" read sitename echo "<VirtualHost *:80> ServerAdmin admin@$sitename ServerName $sitename ServerAlias $sitename DocumentRoot /var/www/$sitename <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/$sitename> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>" > $sitename.conf sudo mkdir /var/www/$sitename sudo chown $USER:$USER /var/www/$sitename echo USER is $USER sudo chmod 775 /var/www/$sitename sudo a2ensite $sitename.conf sudo apachectl restart echo "New site created" |
Why is the default shell in Debian 7 bash? Posted: 25 Jun 2022 05:45 AM PDT As per documentation, dash should be the default shell in Debian Wheezy, however when I open up a terminal and check the SHELL variable, it points to /bin/bash . Since this is a fresh install, and I have not made any changes, why is this not pointing to /bin/dash ? Or is the default shell stored or pointed to by some other variable? |
How can I specify that curl (via command line) overwrites a file if it already exists? Posted: 25 Jun 2022 06:35 AM PDT I'm using curl in this syntax: curl -o myfile.jpg http://example.com/myfile.jpg If I run this command twice, I get two files: myfile.jpg myfile-1.jpg How can I tell Curl that I want it to overwrite the file if it exists? |
Why is grep -o -w not giving me the expected output on Mac OS X? Posted: 25 Jun 2022 07:14 AM PDT If I do echo foo bar baz | grep -o -w baz the output is foo bar baz (and an extra newline). The expected output would be baz as the -o option should only display the matched part. I'm using Mac OS X 10.7.1 and the grep version is grep (GNU grep) 2.5.1 |
No comments:
Post a Comment