General :: Perform A Long Directory Listing Of All Files In The /bin Directory That Have Exactly Three Characters In Their Name?
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
ADVERTISEMENT
Jul 20, 2010
Is it possible for listing directory and files' permission into numbers?
Generally ls command shows directory and files' permission as follows;
[root:maestro:/home/ddisk_net]# ls -al
Total 44
drwx------ 4 ddisk_net users 4096 7월 20 10:40 .
drwxr-xr-x 21 root root 4096 7월 20 10:28 ..
-rw------- 1 ddisk_net webteam 5 7월 20 10:40 .bash_history
-rw-r--r-- 1 ddisk_net users 33 1월 22 2009 .bash_logout
[code].....
View 9 Replies
View Related
Jul 26, 2010
I'm always hesitant to use /var/tmp/, because I never quite know exactly how long the files are kept there for, or even what the directory is used for. What determines when a file gets removed from /var/tmp/, and how is the directory intended to be used?
View 2 Replies
View Related
Oct 16, 2010
I think as a result of a script that started duplicating files in a loop, the allotted capacity on my VPS filled up with multiple nested copies of the same files... After a reboot, I could delete most of them, but got rm stalled in certain directories...
after isolating which ones, I found this: a directory listing that lists the files, and at the same time tells me they are not there!!!
partial listing:
Code:
ls
ls: cannot access userkey.php: No such file or directory
ls: cannot access workshop.php: No such file or directory
ls: cannot access quiz.php: No such file or directory
ls: cannot access webservice_rest.php: No such file or directory
[Code]....
View 5 Replies
View Related
Jan 2, 2011
If I runls -R1I get a recursive listing of all files under the current directory.However, if I dols -R1 *.avi, ie I want to search only for files with the file descriptor .avi, I get an errorQuote:ls: cannot access *.avi:No such file or directorySo it seems I am using ls incorrectly. What's the correct way to use wild card pattern matching when using the -R switch? Or maybe that isn't possible?
View 2 Replies
View Related
Feb 1, 2010
I have RHEL5 with apache installed and running. I have a directory off of / called software that I would like to have show up as a directory listing so if I go to [URL] I get the directory listing. I have tried searching around and nothing seems to work for me. So out of the box how do I get this to work? My server properly resolves to [URL] so I am good there.
View 8 Replies
View Related
Jan 24, 2011
I have a usb drive which I will call it "mydrive" for this discussion. I am trying to get to it so I can do a ls -al on the usb device itself.
But I'm not sure how to get to the dir entry for the device.
View 4 Replies
View Related
Jun 16, 2011
This is the script I'm running
tar tf some.tar somefolder_insidetar
And output it's a list with all folders, files, and SUBDIRECTORY Files, the only thing I need it's just show the contents (folder and files) of the current directory choosed, not listing subdirectory files, or subdirectories inside subdirectories.
View 3 Replies
View Related
Sep 6, 2010
Is there a command to return a recursive listing of sub-directories and the number of files in them? I have found plenty of ways to give me the total number of files in a directory structure, but none that gives a list of the sub-directories with the number of files in them. "du" gives me a listing of directories with their sizes, but I couldn't find an option (or any other way) to give me the number of files as well. Ideally, I'd like to get list with "Size" "Files" "Dir name" - And the order of the columns doesn't matter. Is there a "simple" command line solution or do I need a shell script for that?
View 5 Replies
View Related
May 3, 2011
I have, for example, a folder called "MyFolder" and it contains 3 files: MyFile1, MyFile2, MyFile3. The only file that I do NOT want a particular user/group to even see that it exists is, for exmple, MyFile2.So, when they do a directory listing on MyFolder, they should only see MyFile1 and MyFile3. How can this be done in Linux? The important thing is that it is not just preventing them from "executing" MyFile2, but to prevent them from even knowing that it exists by not including it in a directory listing.This is a simpified example using one file, but in reality, I have lots of files and some of those that I want to block are also subfolders.It is very important for me to hide the existence of certain files/folders when the user does a directory listing. It's also important that the files stay in their current folder (that is, I can't use a workaround which requires moving all the files into a separate folder and then securing that folder).
View 4 Replies
View Related
Aug 4, 2010
I have a user who just got a new laptop and when he connects to the FTP server, it verifies his username and password like it should, but when it goes to do the directory listing, it just kinda sits there. if i refresh the view, the folders show up. wonder if there's something in a log somewhere for vsftp i should be looking at. it could just be his ftp client or air card too, but i want to be thorough on the server too becuase it will help me learn.
View 2 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
Feb 11, 2011
If I have a directory /foo with a few files in it, how do I symlink each entry in /foo into /bar/? For instance, if /foo has the files a, b and c, I want to create three symlinks:
/bar/a -> /foo/a
/bar/b -> /foo/b
/bar/c -> /foo/c
View 3 Replies
View Related
Jun 30, 2011
How would i go about copying files to a directory, yet skip the files that already exist in the directory, and also remove the files that are in the directory. For example:
Code:
$ls /dir1
img001.jpg
img002.jpg
[code]....
Now i would like to copy from dir1 to dir2, but the contents of dir2 would be:
Code:
$ls /dir2
img003.jpg
View 7 Replies
View Related
May 26, 2010
For reasons I won't get into, I need to copy directories so long as the average system load is low. Can someone help me write a BASH script that will copy the contents of a directory, but check to make sure the average system load is below X before copying each file, and if not, wait Y seconds and try again?
View 3 Replies
View Related
Oct 22, 2010
Within the mv() command is there any way to not need to type the entire directory location? In the example there are directories with varying depths... I want to move a file from depth 2 to a directory of depth 3 when the directory of depth 3 is within the directory of depth 2. Basically, can I cp() andor mv() a file to a subdirectory without having the enter the entire directory location?
Code:
[root@xxx dir]# ls
dirD1
[root@xxx dir]# cd dirD1/dirD2
[root@xxx dirD2]# ls
[code]....
View 6 Replies
View Related
Mar 19, 2010
I have set up Ubuntu 9.1 with Samba etc. as a web server. The files are in /var/www and are shared through Samba as web. The root directory and sub directories have index.htm files in them but unfortunately except for the root directory users can see the directory listing rather than the directory automatically producing index.htm. This is obviously causing security problems. How to prevent directory browsing by users coming into the server over the internet by a redirect URL from another site. E.g. [URL] where bigwebsite is a domain registered with a change ip server because I have a service which dynamically allocates an IP Address.
View 3 Replies
View Related
Feb 21, 2010
Recently I mounted a larger partition into my home directory since I was running out of space, Everything went smoothly, but it caused me to wonder about something I cant figure out. While playing with the mount unmount commands when I was copying everything over... before editing my fstab.
Is there a way to access the files that existed in a directory before you mount a partition to that directory? after mount the original files are gone.unmount and they are back, Where do they go?
View 3 Replies
View Related
Aug 1, 2009
i want to copy a few files from my windows directory into the wine directory - its no big deal, just a few preference files so i dont have to set something up all over again. trouble is, i had the files copied, but i cant find the wine/ c: drive directory anywhere, anyone know where this can be found??
View 8 Replies
View Related
May 3, 2011
When I run "ls -al somedir*" (I use the "ll" shortcut, actually), Linux not only list files that match, but also the contents of directories whose name also happens to match.Is there a way to limit "ls" so that it will only show names (files and directories) and ignore the contents of the directories?
View 2 Replies
View Related
Jan 3, 2009
After i try to find logfiles follow date/month/year. i want copy this files to another directory with name's directory is time you find(date/month/year).
View 4 Replies
View Related
Mar 18, 2010
I am using my media server as my podcast collector. I am in the process of learning the ins and outs of NFS so i can mount a NFS directory and transfer my podcasts from server to player. For now i am using scp to transfer podcasts from server to desktop then to player. The problem is the path to the directory of one of the podcasts is /home/user/gpodder-downloads/The BILL&TIMMY Show Podcast.
whenever i try and run my scp command it fails because it thinks that TIMMY is a script i want to run in the background. I have tried to back-slash escape the character, i've tried single quoting and double quoting the character and i still get the same problem. as it sits now i have to move all podcasts to another directory and then transfer them to my desktop...but i would like to transfer the podcasts without un-necessary steps.
View 8 Replies
View Related
Nov 14, 2010
There are millions of files in many directories. Wherenver i try rm * or find or use xargs, they say 'argument list too long' and exit. How can i deleted files in a directory with so many files without deleting the directory itself.
View 3 Replies
View Related
Oct 20, 2010
how to pipe the current directory listing into sort so that the output is the date in descending order (primary sort key). If there are multiple entries with the same date, I'd like the times sorted in ascending order. It seems simple but for some reason this isn't working:
ls -l | sort -k 6r -k 7
For some reason it doesn't seem to ever get to the second sort key when using column 6 (last modified date).
View 2 Replies
View Related
Jul 7, 2010
I have two questions:How do I remove files from Directory A if their name appears in Directory B?How do I move foo.jpg and bar.jpg from Directory C to Directory D if and only if foo.png and bar.png appear in Directory D?I suspect there's probably a bash one-liner for this, but...I can't come up with it.
View 5 Replies
View Related
Jul 20, 2011
I'm using OpenSSH 5.5p1 on Fedora 15. I'm trying to get a chrootDirectory to work. Specifically trying to figure out why I can't write files to a sub-directory of the chroot directory. I created a user test_user and created a group called sftp. I added test_user to the sftp group. I edited /etc/ssh/sshd_config as follows:
Code:
Subsystem sftp internal-sftp
Match group sftp
ChrootDirectory /home/sftp_users/%u
X11Forwarding no
[code]....
View 1 Replies
View Related
Oct 6, 2010
Just want a very simple directory listing output, no real need for hyperlinks, preferably with a line space between items, that the end user can print out.
I have this code, just don't have the knowledge to make it do what I want.
Quote:
View 6 Replies
View Related
Apr 26, 2011
I obviously a noob to Suse but after installing 11.4, and filezilla, i cant connect to my ftp server. Ive opened ports 21 22 and 990 explicitly in the firewall and all I get is a 425 error Cant Retrieve Directory Listing. It logs me in ok but doesnt allow data connections?
View 9 Replies
View Related