02-26-2008
Thanks. I should replace "$DIR" with the name of the directory in examples 1 and 2? In 1 it makes sense, but in 2 I need it to work on _all_ directories and files in the current directory. I understand that's what the find command does, but why would it need a "$DIR" argument?
For 3, where can I read the directory entry, or is that only available on the filesystem level?
Thanks for the answers. I really like the open, no-secrets thinking of Linux. No black magic, and everything can be explained.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have need of starting the app manager or what ever it is called from the CLI.
I can start the text editor and file manger i.e. dtpad, dtfile & dtmail etc...
But I have forgotten the command to start the app manager.
Help!!!!
:D (1 Reply)
Discussion started by: jagannatha
1 Replies
2. Shell Programming and Scripting
When I say "Command Line Interface" I mean the wrapper that allows you to type "commands" and have then correspond to pre-programmed actions... all the while making sure that it looks like you are INSIDE a shell of sorts.
I had good hope for "common.cli" but that didnt last long, when I found... (1 Reply)
Discussion started by: jjinno
1 Replies
3. UNIX Desktop Questions & Answers
Is there a way we can get a web page through CLI on a unix machine? Please help! (3 Replies)
Discussion started by: Pouchie1
3 Replies
4. Programming
Hi all,
Am trying to develop CLI kind of program which does a telcom switch configuration . I have to provide a terminal and a prompt to user for that I did following:
static struct termios old_term;
struct termios new_term;
tcgetattr(STDIN_FILENO, &old_term);
new_term = old_term;
... (3 Replies)
Discussion started by: zing_foru
3 Replies
5. Homework & Coursework Questions
1.) I am to write scripts that will be phasetest folder in the home directory.
2.) The folder should have a set-up,phase and display files
I have written a small script which i used to check for the existing users and their password.
What I need help with:
I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies
6. Ubuntu
Please -- I cannot find how to change in terminal from e.g. sda1 to sda2 or to sdb*
Any ideas please? (3 Replies)
Discussion started by: Royalist
3 Replies
7. Solaris
Hi, Hoping someone out there has seen this before.
My backup/restore operation failed when my system ran out of memory
Restore operation failed
Setting ZFS Boot Environment to rootpool
cannot set property for 'rootpool': out of space
Installing GRUB Boot Loader into the first disk
stage1... (2 Replies)
Discussion started by: A-Train
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I was not sure about the terminology of the thing that I am about to explain, so it was very difficult to find relevant search results.
I want to use my computer using the ctrl+alt+f1 CLI without using a graphical system. However, at the same time, I would also like to do basic tasks like... (6 Replies)
Discussion started by: jamie_123
6 Replies
9. Shell Programming and Scripting
I am writing a script to login to to a mongo DB node and get the status of that machine. The usual work flow is :
# mongo admin -u root -p root
MongoDB shell version: 3.0.11
connecting to: admin
rs0:SECONDARY>
Then in the new prompt I can run a command to check status :
... (0 Replies)
Discussion started by: Junaid Subhani
0 Replies
10. UNIX for Beginners Questions & Answers
I prefer for my computers to boot in the CLI. Back in the day, all you had to do to make this happen (on Debian-based) was edit a line in /etc/default/grub and then run:
sudo update-grub
But for some reason now, more updated (I guess) operating systems won't accept this, you have to manually shut... (2 Replies)
Discussion started by: Huitzilopochtli
2 Replies
LEARN ABOUT FREEBSD
rmdir
RMDIR(1) BSD General Commands Manual RMDIR(1)
NAME
rmdir -- remove directories
SYNOPSIS
rmdir [-pv] directory ...
DESCRIPTION
The rmdir utility removes the directory entry specified by each directory argument, provided it is empty.
Arguments are processed in the order given. In order to remove both a parent directory and a subdirectory of that parent, the subdirectory
must be specified first so the parent directory is empty when rmdir tries to remove it.
The following option is available:
-p Each directory argument is treated as a pathname of which all components will be removed, if they are empty, starting with the last
most component. (See rm(1) for fully non-discriminant recursive removal.)
-v Be verbose, listing each directory as it is removed.
EXIT STATUS
The rmdir utility exits with one of the following values:
0 Each directory entry specified by a directory operand referred to an empty directory and was removed successfully.
>0 An error occurred.
EXAMPLES
Remove the directory foobar, if it is empty:
$ rmdir foobar
Remove all directories up to and including cow, stopping at the first non-empty directory (if any):
$ rmdir -p cow/horse/monkey
SEE ALSO
rm(1)
STANDARDS
The rmdir utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
HISTORY
A rmdir command appeared in Version 1 AT&T UNIX.
BSD
March 15, 2013 BSD