General :: Automatically Append Flags To Certain Commands?
Feb 12, 2011
Greetings, I want to automatically append flags to certain commands. For example, when I type:
ls
at the prompt, I want the
-la
flags automatically appended without me having to type:
ls -la
View 2 Replies
ADVERTISEMENT
Jun 18, 2009
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.
View 2 Replies
View Related
May 11, 2010
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?
View 5 Replies
View Related
Jan 15, 2010
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.
View 3 Replies
View Related
Jun 29, 2011
I have beeen trying to find a list of all flags that can be used in UNIX and their meaning but I have had no luck.
Does anyone know if such a list exists?
If so where can I find it?
View 10 Replies
View Related
Aug 22, 2010
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
[Code]...
View 4 Replies
View Related
Jun 28, 2011
While using wifi slax every gos ok until i get wlan0 error while getting interface flags no such device how can i fix this.
View 1 Replies
View Related
Mar 16, 2010
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?
View 1 Replies
View Related
Oct 7, 2009
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.
View 8 Replies
View Related
Mar 19, 2010
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:
DIRdrwxr-xr-x redhat-lsb
DIRdrwxr-xr-x rhgb
LNKlrwxrwxrwx rnDIRc.key
DIRdrwxr-xr-x rpm
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.
View 6 Replies
View Related
Aug 24, 2010
the query is ||| how to append a char | string |||
#!/bin/bash
echo -n "one""two""three"
#END
above method is working well but below method is not working ?
#!/bin/bash
one=one
two=two
three=three
echo -n $one$two$three
#END
View 5 Replies
View Related
Apr 9, 2010
i just want to create a folder with current time.
For example.
foldername_09042010 How do i modify mkdir or write script to do this?
View 6 Replies
View Related
Jun 20, 2011
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.
View 3 Replies
View Related
Nov 28, 2010
Can you please let me know how can i append # in the begining of each line Based on a a search string lile /^8282##8282/gc
View 1 Replies
View Related
Feb 21, 2011
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 ?
View 1 Replies
View Related
Aug 22, 2009
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.
View 1 Replies
View Related
Nov 22, 2010
I wanted to be as clear as possible. I have to add hundreds of new servers to hundreds of configuration files in Nagios. Here is a sample structure:
servers.txt has:
SERVER3
SERVER4
[code]....
View 10 Replies
View Related
Nov 5, 2010
Using sed, I am trying to append four commas ',,,,' at the end of lines containing the pattern 'Response' in a text file with lines such as these:
6,Pulse,50,254968,14886,NA,,,,
7,Picture,8,265157,0,1,15045,2,0,15000
7,Response,1,271553,6396,1
7,Pulse,50,274969,9812,NA,,,,
8,Picture,1,290232,0,1,15045,2,0,15000
8,Pulse,50,294969,4737,NA,,,,
[Code].....
View 1 Replies
View Related
Jan 25, 2010
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 ?
View 2 Replies
View Related
Jul 3, 2009
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?
View 4 Replies
View Related
May 19, 2010
I have problems with linking object files.
This is what I get:
View 8 Replies
View Related
Mar 14, 2011
I am executiong a instruction, ADD CX, BX ;which affects the (carry flag) CF =1
Now, my question is when (CF =0) it will be reset ?
Is there any constrains for other flags/instruction to reset FLAGS?
View 1 Replies
View Related
Jan 15, 2010
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.
View 1 Replies
View Related
Feb 19, 2010
I have to modify formsweb.cfg file in Oracle IAS.
Problem description
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.
Example snippet from formsweb.cfg
View 2 Replies
View Related
Sep 7, 2010
I am creating a very minimal LFS distro that will be targeted towards a very low ram machine as a server.
The machine has 32MB of RAM and a P3 Processor.
I am using a flash drive as the hard drive. The flash drive is rated at 512 MB.
The processor I am not worried about but the RAM I am.
What would be the best optimization flags for RAM and Size?
I didn't set "march" to "native" because I am building the LFS distro on a much much faster PC and going to run it on the older PC.
I know: CFLAGS="-Os -s -march=pentium3" is the minimal but is there anything else?
Should I use "-march=pentium3" or "-march=i686"?
View 2 Replies
View Related
Jul 23, 2015
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.
View 2 Replies
View Related
Nov 2, 2009
I have several questions:
Is it possible to find out with which flags system was build?
Is it possible with what options and flags application was built ( mplayer for example)?
How to set default gcc flags for building packages in fedora?
View 2 Replies
View Related
Mar 26, 2011
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
View 2 Replies
View Related
Apr 10, 2010
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.
View 2 Replies
View Related
Apr 10, 2011
If I would normal compile using the following line:
Code:
Where should those library flags go in a makefile? Say I having the following makefile:
Code:
all: ${PROGS}
clean:
View 8 Replies
View Related