I want to put Google analytics code on all legacy pages on my server, most of them don't have a template so I was wondering if Apache can automatically append the code.
I have a folder and its contents with the following permissions: 2750 (sguid bit). With this I ensure that a newly created file or folder inside that folder will adopt the SGUID. The problem is that if I copy files into that folder, these copied files don't adopt the SGUID. So I have to execute constantly the command: chgrp -R thegroup nameofthefolder everytime I copy or uncompress something into that folder. Is there any way to achieve this (force the SGUID even in copy and uncompress commands) automatically?
I had automated some tedious commands in the terminal by writing them in a text file and placing an icon on the panel. By clicking the icon the commands ran in the terminal automatically. I cant for the life of me remember the icon command I used to get this to work.
I'm connected to the internet using a wireless router. Each time I boot, I have to grant root privileges and type in a shell: iwconfig wlan0 essid linksys key dhclient wlan0 Isn't there a file(or location) that I can modify to automatically grant root privileges and execute these commands when debian starts? Something like autoexec.bat in windows.
Something else I'd like to mention is when I execute iwconfig.... for the first time, I get this incomplete result:
IEEE 802.11bg ESSID:"linksys" Mode:Managed Access Point: Not-Associated Tx-Power=27 dBm Retry long limit:7 RTS thr:off Fragment thr:off Encryption key*********** Power Management:off
Can both EXT4_FEATURE_INCOMPAT_META_BG and EXT4_FEATURE_INCOMPAT_FLEX_BG flags turn on the same time? If yes, I am wondering whether there is a correlation between the numbers of block groups in META group and FLEX group. Where are backups of superblock and group description table (GDT) stored in this case?
I know similar questions have been asked before but I cannot seem to get it to work.I have a file file.something.nhMMYY that i need to ftp (MMYY being Month and Year)I want to add something into the script to auto-magically insert the MMYY.
I'm doing an assignment for school, and while we have not yet learned regular expressions, my teacher would like us to use AWK to append text to certain lines in a file. What we've had to do is creating a listing of all links and directories in the /etc folder and place them in a text file. From this, we were to cut the first field (Permissions) and the ninth field (filename) and create another text file. Now the part that I'm struggling with is this and I'm not sure if I should be using sed or awk. We're supposed to ADD the text "DIR" to the beginning of any line that is a directory, and "LNK" to any that is a link, like so:
Obviously, I realize that the first character in the permissions denotes what sort of file it is, hence when I created my text file I used
ls -l | grep "^d" > file.txt and ls -l | grep "^l" >> file.txt
I'd like to learn how to properly do this, but struggling through pages on the internet hasn't been helping, nor has the --help command. Therefore, while I would like the answer, I'd also like to know what the heck I'm doing For example, I know I could delete lines with regex using d/[STUFF I WANT TO DELETE]/g (To get rid of all occurences) and I can substitute using s/foo/bar But I'm unaware of anyway to ADD text upon certain occurences, let alone two different circumstances.
we have centos and a win2k8 server. Our pos system is on the centos server. I created a HOST (A) record on win2k8. so users don't have to remember the ip address of the centos server.so i created a friendly name like URL... and the POS web page will be loaded.but my questions is it possible to configure the centos to automatically append the port number if the user type URL... will be auto added at the end of it.
I have a existing zipped file , I want to use gzip command to append some files to it , I tried man gzip but can't find the key word "append" , can advise how can I do it ?
eed to make a script to append a line to the bottom of multiple files (only certain files, but 100's spread over directories).Doing a find replace inside multiple files is easy, I use the followingfind /base/dir -name "*.txt" -exec perl -pi -w -e 's/FIND/REPLACE/g;' {} ;So I tried doing the followingfind /base/dir -name "*.txt" -exec echo "Append this" >> {} ;However this just appends all the text into a file called "{}". Whereas {} should be replaced with each file that's found.
what to do for lock automatically slackware 13 if not used for n minutes ?What can i do to start automatically the ktorrent (a bittorrent program for linux) on system starts on slackware 13 ?
I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?
may be an advanced question but I need to know how to do this. Here at work I am in charge of recruiting and we have about 1,000 resumes in already. All of the resumes are in a .pdf format. I need to rename every .pdf in the following format:{firstnameLastname}.pdfThe only way I know how to do this is to convert all the .pdf files to text, extract the name out of the first few lines of text, import into excel, and then use VBA to rename the files in mass:Here is my logic so far:~Deskop/a = houses all the .pdfresumesOpen terminal: Code: cd ~/Desktop/afor f in *.pdf; do pdftotext -raw $f; done That will convert all of the preceding resumes into text filesNow I would like to append the name of the text file into the last line of the text file. So, for example, for Resume1.txt, I want to append "Resume1.txt" to the last line within Resume1.txt. So after I run the command I open Resume1.txt and on the last line within I want to see "Resume1.txt" on the last line, at the end of the resume.How can I do this? I would like to use a loop and have the terminal append the filename to the body of the text file until all of the have been appended.
In formsweb.cfg file are two lines with labels archive_jini= and archive= at the beginning of line. After equal sign (=) is row of filenames of java archives delimited by coma(,). When I insert a new jar file in java directory, I have to append the very same name of jar file to both lines if that name is not yet present.
I'm researching how I want to go about making my own LXDE install without using any of the options from tasksel. I have a few questions about metapackages.
First: Will the apt-get flags "--install-suggests" and "--no-install-recommends" affect what is installed from metapackage dependencies?
For example, if I install the lxde package, it also installs lxde-core. If I do:
Code: Select allsudo apt-get install lxde --no-install-recommends will recommended packages from lxde-core also be excluded?
Second: Is there a way to automatically install the alternative "or" packages listed?
For example, [URL] lists several alternatives to the defaults: audacious instead of lxmusic, transmission instead of deluge, etc.
i am trying to connect my AWUS036H to my Compaq CQ60 laptop running Ubuntu 10.10. when i check ifconfig, one minute my wlan1 is there, next minute its not, if i try to do a sudo ifconfig wlan1 up i get, wlan1: ERROR while getting interface flags: No such device and when i try it again it accepts the command no probs, i suspect this is because the device is in and out every few seconds. when i checked rfkill, i found a hard block which i resolved with unblock all, i have checked the unit under windows and it works just fine so i suspect it is a problem with my ubuntu
Running Vector Linux 6.0 light (icewm). I've always set my compiler flags at the end of my profile file in etc folder (/etc/profile). They always worked whenever it came to compiling any application (./configure && make). Since I installed vector linux they don't. I used mostly slackware in the past then switched to absolute linux. Loved it but then it got old + on reinstall it crashed on bootup with horizontal corruption on bottom half of screen! Don't know why cause everything was the same!
So obviously vector linux works somewhat different as my compiler settings are stored the same way I've always stored them in /etc/profile but they aren't being used-enforced.
Hell I even made a #/bin/bash file with | CFLAGS="blah" CXXFLAGS="${CFLAGS}" && export CFLAGS CXXFLAGS | but after making it executable they don't wanna stick. Not sure if it was done before the ./configure part of compiling though... Even if it did work it's still not the set it and forget it that I've always had with past slackware installs
How do I tell vector linux to use my compiler flags without having to make it work but typing in console | CFLAGS="-O2 -march=prescott -mtune=prescott -pipe -ffast-math -fmerge-all-constants -funswitch-loops -mmmx -msse -msse2 -msse3 -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" && export CFLAGS CXXFLAGS ./configure | everytime I wanna compile something?
I can login-stay in real-mode terminal console incase I feel like doing things outside of X. I like vector linux but I wish it was more slackware like. It seems a bit proprietary for being like slackware.