![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pseudo-terminal will not be allocated because stdin is not a terminal. | Shivdatta | UNIX for Advanced & Expert Users | 1 | 08-04-2008 10:29 AM |
| code that reads commands from the standard i/p and executes the commands | Phrozen Smoke | High Level Programming | 4 | 01-22-2007 02:06 AM |
| HP UX Terminal Help | gpta_varun | HP-UX | 0 | 05-11-2005 02:16 PM |
| like to have fun in terminal | collins | UNIX for Advanced & Expert Users | 4 | 10-14-2004 05:28 PM |
| connecting to unix through hyper terminal - as a dumb terminal | michelle | UNIX for Advanced & Expert Users | 2 | 11-05-2001 03:32 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Terminal Commands
Hi there. Linux newbie and I'm trying to find commands to:
Display number of executable files in a directory that i supply and list them in alphabetical order Back up all the files in the current irectory to a directory i supply, creating that directory if it's not allready there Cound number of occurances of a file name that i provide in the file system. Any help would be really appreciated! Cheers |
|
||||
|
Well to find out whether a file is executable under a directory, I cannot think of any command as such present in unix, I doubt whether there is any. You can use this script to find out the executable file
Code:
#!/bin/sh
for i in `ls -1`
do
if [ -x $i ]
then
echo $i
fi
done
Cheers JK added code tags for readability --oombera Last edited by oombera; 02-19-2004 at 12:27 PM.. |
|
||||
|
For second query
cp -R JUNK JUNK1 JUNK is the existing directory JUNK1 is the non-existing directory, if the directory exists then JUNK will be its sub-directory For third query find ./ filename It will search the whole of the file system and will take lot of time Cheers |
|
||||
|
find ./ filename | grep -x "filename" | wc -l
It would have been better if you had come with this solution rather than me, just try around and play with unix you can find lot more stuffs and you can also learn more Cheers |
![]() |
| Bookmarks |
| Tags |
| linux, linux commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|