General :: Flag To Test Is Not Directory?
Mar 25, 2011
I found that this tests if a give filename is a directory or not:
Code:
-d "$FILENAME"
But what test for not a directory? I tried
Code:
-D "$FILENAME"
But this doesnt work?
View 1 Replies
ADVERTISEMENT
Apr 20, 2010
I have an interdependent collection of scripts in my ~/bin directory as well as a developed ~/.vim directory and some other libraries and such in other subdirectories. I've been versioning all of this using git, and have realized that it would be potentially very easy and useful to do development and testing of new and existing scripts, vim plugins, etc. using a cloned repo, and then pull the working code into my actual home directory with a merge.
The easiest way to do this would seem to be to just change & export $HOME, eg
cd ~/testing; git clone ~ home
export HOME=~/testing/home
cd ~
screen -S testing-home
# start vim, write/revise plugins, edit scripts, etc.
# test revisions
However since I've never tried this before I'm concerned that some programs, environment variables, etc., may end up using my actual home directory instead of the exported one. Is this a viable strategy? Are there just a few outliers that I should be careful about?
View 1 Replies
View Related
Mar 26, 2011
I have created mobility of 20 nodes and vbr traffic using following attached script I executed the file as ns234 vbr.tcl I got the vbr.tr and vbr.nam but I was unable to load the graph using matlab <trgraph> I thought problem with is vbr.tcl script.
View 1 Replies
View Related
Aug 27, 2010
I wrote a test app that scans for plugins in a directory, calls their getWidget() method (implemented in my interface), and adds that widget to a layout.
The problem is that when I added a QTimer to my plugin class, it didn't work! Why?
And will it be easier to write the thing in Python and not use QPlugin? I just want to define a QWidget and have it added to the app.
View 8 Replies
View Related
Jul 31, 2010
I need to compile "/usr/share/zoneinfo/" to a directory in /home/dir/ so I can use it in a program to find and assign a time zone to users (example: UTC +3 or similar) and I need all available cities and town in it. it seems I should be able to do that with "zic" but what I found and tried does not work. I needed examples and I found the only info giving examples comes from: [URL]... Trying the 2 first lines verbatim after creating the "test-tz" directory gives an error that was to be expected although I use the distro used in the example, this is because the directory "australasia" does not exist but directory "Australia" does.
[code]...
I should be able to extract the info mentioned above is correct?
View 1 Replies
View Related
Jul 19, 2010
What does the mkdir -p flag do? i.e the '-p' part?
View 1 Replies
View Related
Oct 15, 2010
What does the -i flag mean in rm i my_file?
View 2 Replies
View Related
Jan 24, 2011
In another forum (I each day visit a lot of them) a user was stating that you need to set a boot flag to make the root partition bootable, if you create partitions with GParted in order to install a Linux with GRUB2. Another was suggesting that, if you install Linux with GRUB2, the installer automatically sets a boot flag to the root partition to make it bootable (I don't remember the names). I neither believe the first nor the second thesis and I'm hoping that in this excellent forum some Gurus not only are saying I'm right but also give a comprehensive answer.
View 2 Replies
View Related
May 26, 2010
I just bought an Eee Box with Red Flag Linux Desktop 5.0NE. My intention was to use it as a backup server at home to backup files and photos, etc.
How to I get to a graphical user interface so I can start to know what I'm doing?
When I switch on the machine, it says:
Red Flag Desktop 5.0NE
Kernel 2.6.21.0-22 on an i686
localhost login:
View 1 Replies
View Related
Apr 15, 2010
I have a created an ext3 partition and when i tried to set is hidden flag, there seems no effect. how to set the hidden flag of an ext3 partition?
View 1 Replies
View Related
Jun 21, 2011
I'm trying to create a shell script to take an argument and use it to name a terminal tab. So if the script's name is tabnm, tabnm "test" should rename the current tab "test"
This is my code:
#!/bin/sh
echo -ne "e]1;$1a"
but when i run it I get this output:
robin@icarus $ sh tabnm.sh test
-ne e]1;test
If I just run echo -ne "e]1;Testa" straight in the shell, the tab is renamed.
View 2 Replies
View Related
Apr 8, 2010
I am using Rsync to backup files to a another machine, the users on my fileserver do not exist on the backup server so Rsync throws errors about the permissions. It copies the files fine but I want to get rid of the errors and have Rsync ignore the permissions when backing up.
/backup is a mounted ftp directory
Below is the current command and output:
Code:
root@Fileserver:~# rsync -av --delete /shared/fileshare/ /backup/backup
building file list ... done
created directory /backup/backup
./
manager/ .....
rsync: chown "/backup/backup/manager/.chironfs.txt.c6MbJ7" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.hdBG4P" failed: Operation not permitted (1) .....
sent 211115 bytes received 274 bytes 7686.87 bytes/sec
total size is 210263 speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
View 3 Replies
View Related
Aug 4, 2009
I installed cygwin with rsync on a Win XP Machine. My goal is to backup a folder from one hard drive to another (both on XP machine).
I run the following command from a batch file:
Works fine except the --delete flag is not working. Copies everything in source to destination, but doesn't delete some extra files that are present on the destination, but aren't on the source, which it's supposed to. I looked at the rsync man page, and I'm doing everything right... such as not using wildcard.
The same command works perfect on another computer (XP machine; source and dest both on XP machine).
View 1 Replies
View Related
Jul 24, 2011
i would like to create a script that calls a command with a flag....
/usr/bin/wget
calling
"curl -O"
[code]....
View 1 Replies
View Related
Jan 19, 2010
I have tried to install both wubi ubuntu and linux mint8 both times they start I see the new desktop briefly then I get a "no signal" flag on my display But I can hear the startup chime as the program finishes loading!
View 1 Replies
View Related
Apr 3, 2010
Searching syslog to diagnose other problems I encountered this line. As near as I can tell it has nothing to do with any problem I have.
View 2 Replies
View Related
May 29, 2011
PC1 and PC2 are linux pc's with linux 2.4 (or) 2.6 kernel installed on it.Observations are done on both 2.4 kernel and 2.6 kernel Problem explination:
1)PC1 "ifconfig eth1 down" on linux shell.
2)Check the "ifconfig eth1" on PC2
3) The running flags are unset first(disappear)and set(Re-appear) on the eth1 interface on PC2.
4) unset and set toggling happens with in short period of time about 1 or 2 secs.
This is clearly observed in linux 2.4 kernel with some time delay for the toggling, but 2.6 kernel this will happen every quickly..
[Code]..
View 3 Replies
View Related
Aug 25, 2009
Is there a flag or option to discard case sensitivity to find whether package is installed or not?
from http://www.rpm.org/max-rpm/s1-rpm-query-parts.html
Quote:
Note, however, that RPM is a bit picky about specifying package names. Here are some queries for the C library that won't work:
Code:
rpm -q libc-5.2.1
Let say I want to find out whether PyQt is installed or not but not sure the exact case, i.e. pyqt or Pyqt or ....
is there a way to find whether a package is installed or not without knowing its case exactly?
View 1 Replies
View Related
Apr 8, 2009
I have installed Postfix + Amavisd-new, then I am started all services (and configured main.cf and master.cf to use amavis).
The questions are:
1) I am trying to test antivirus scan using eicar test virus
Code:
And the message is successfully delivered to mailbox with mark "CLEAN" in maillog. But I cant see any attachment using
Code:
Where is my mistake?
2) Should I update clam and how I can do it?
3) Is spamassassin enabled by default in amavis (I have started daemon)?
4) Where configuration files of spamassassin is stored?
View 1 Replies
View Related
Mar 15, 2010
I am trying to install mysql 5.1.44..so i downloaded the binary package, i extracted it and then followed the instructions that were in the manual but i keep getting this error when running this command
Code:
scripts/mysql_install_db --basedir=/home/mosty/mysql
the error is
Code:
Installing MySQL system tables...
100315 20:07:27 [Warning] Can't create test file /var/lib/mysql/mosty.lower-test
100315 20:07:27 [Warning] Can't create test file /var/lib/mysql/mosty.lower-test
[code]....
You can try to start the mysqld daemon with:
shell> /home/mosty/mysql/bin/mysqld --skip-grant &
and use the command line tool /home/mosty/mysql/bin/mysql to connect to the mysql database and look at the grant tables:
shell> /home/mosty/mysql/bin/mysql -u root mysql
mysql> show tables
View 1 Replies
View Related
Aug 7, 2010
I just noticed that I find lots of hidden files named ".directory.lock.??????.test" across my samba-shared file system. The questionmarks stand here for some random alpha-numeric patterm.
- Which application might have created them?
- Is it save to delete those ?
With e.g. "find . -type f -name ".directory.lock.??????.test" -exec rm -f {} ;"
View 1 Replies
View Related
Jul 16, 2010
I fired up fdisk and got this warning:
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
I didn't even know that my previous Linux installs where DOS-compatible in any way!
View 2 Replies
View Related
Jun 25, 2010
What is the best way to test a distro? As a newbie, I am trying out several different distro's. I run them from a live CD and see if they are easy for me to set up my wireless, can be configured to multiple monitors, corectly recognize my hardware. I then connect to the internte and see if it plays videos or needs codecs downloaded, then connect to the reository and download any needed codecs, or pick a random program and see how easy it is to download and install.
Is this a reasonable way to check out a distro, or should I be looking at something else? Keep in mind, I am a newbie who is a user, not a hacker, and know nothing of the commandline yet.
View 3 Replies
View Related
May 30, 2011
I want to test something with my JMX console. I need to use the twiddle.sh script (because of a plugin).But when i execute this:
Code:
/opt/jboss-5.1.0.GA/bin/twiddle.sh -s localhost get jboss.system:type=ServerInfo ActiveThreadCount
i get this error:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: org.jboss.console.twiddle.Twiddle
[Code]...
View 1 Replies
View Related
Jun 16, 2010
I am trying to test an rpm by doing a yum install. It should not install and report a dependency conflict as there is deliberately another package installed it should conflict with but it is installing over the existing package. When I do this via an rpm -i it correctly does not install.
Detail below -
The SPEC file has the conflicts below
Conflicts: test_DEV = 1-0, test_UAT = 1-0, test_PRD = 1-0
If test_DEV is already installed for 1-0 and I try and install 1-1 via rpm is correctly conflicts -
rpm -qa | grep -i test
test_DEV-1-0
rpm -i test_DEV-1-1.noarch.rpm
error: Failed dependencies:
test_DEV = 1-0 conflicts with test_DEV-1-1.noarch
Yet when I install both via yum it allows me to install 1-1 over 1-0 which I don't want.
View 1 Replies
View Related
Jun 16, 2010
I am a student studying computer science course.
Well, I am facing problem when doing lab questions.
I must use DLXLinux bundled in Bochs (bochs.sourceforge.net).
I am required to use the /usr/local directory.
In /usr directory, there is no directory named 'local' but there is one thing called 'local@'. So, when I try to use mkdir command to create 'local' directory in /usr , there are error "cannot make directory.....".
Look at my screenshot at [url].
View 9 Replies
View Related
Jan 18, 2010
How do you perform a long directory listing of all files in the /bin directory that have exactly three characters in their name?
View 1 Replies
View Related
Jan 29, 2010
Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?
View 2 Replies
View Related
Oct 13, 2010
I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | [filename] | mail -s "This is just a test" [email address]
I would rather not write a bash script. Is there an easier way to do this? I was looking into some commands like find and grep.
View 6 Replies
View Related
Jul 13, 2011
I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively
View 4 Replies
View Related