General :: Show Folder And Only One Subfolder Using Ls In Command Line?
Jul 13, 2011
I have many folders with many subfolders. All I want it to get the folder name and the first subfolder. I tried using ls -R but this give me more than I want it. Let say I have:
dir1/subdir1/sub_1_1/file.a
dir1/subdir1/sub_1_1/file.a2
dir1/subdir1/sub_1_1/file.a3
[code]....
All I want when I execute the command is to show me:
dir1/subdir1
dir1/subdir1
dir1/subdir2
[code]....
View 4 Replies
ADVERTISEMENT
Jun 11, 2010
I have a folderA that contains folderB that contains a lot of files. I would like to get rid of folderB, but not its contents. I want those contents to be inside of folderA. How can I accomplish this on the commandline?
View 2 Replies
View Related
Jul 29, 2011
I want to delete a subfolder ABC in a main Project folder Globe. It occurs in many subfolders. It is very hectic to search and issue an rm -rf ABC command. I need to make a script for that .
View 4 Replies
View Related
Sep 29, 2010
I know these folders each have >80gb of files. Yet, they only show 4.0K in ls -lah? How can I have ls show size including the contents?
[root@aapsan01 aapxen01]# ls -lah
total 48K
drwxrwxrwx 6 root root 4.0K Sep 29 03:45 .
drwxrwxrwx 15 root root 4.0K Sep 27 09:15 ..
[Code]....
View 4 Replies
View Related
Oct 31, 2010
This has to also show the line count. I can get it to show the files but not the line count. What is the single command used to identify only the matching count of all lines within files under the /etc directory that contain the word „HOST? List only the files with matches and suppress any error messages.
View 4 Replies
View Related
May 20, 2010
I want to show the contents of a file on Dialog box for which I have use the "--textbox" dialog and "--tailbox" dialog.
But it doesn't show the whole contents of file, it only shows some of the data.
How do I get it to show the entire file data?
View 1 Replies
View Related
Nov 24, 2010
How can I open a folder in a window from the command line. I don't want to list the contents of the folder by the "ls" command, but want to open the folder through the command line, like it opens when we double click on the folder.
View 12 Replies
View Related
Jul 18, 2011
I want to find a desktop application or command line tool to show two different timezone concurrently under LINUX.
Anyone knows there are such application?
Say i want to know the time at london and USA at the same time. (different time zone)
View 4 Replies
View Related
Mar 1, 2010
How to move folder which have same name in subfolder Path : /root/Documents/untitled_folder/untitled_folder/abc.txt I want to move files from that folder how to do that
Output : /root/Documents/untitled_folder/abc.txt through terminal any idea ? and plz suggest a way to do in all folder present in directory recursevely how to check recursively in all folder's present in directory
./folder1/abc.txt
./folder1/folder1/abc.txt
./folder2/folder2/folder2/bbc.txt
./folder3/folder3/folder3/folder3/my.txt
./folder4/folder4/folder4/folder4/folder4/bcz.txt
./folder5/folder5/ca.txt
[Code]...
View 9 Replies
View Related
Jun 27, 2010
I have a small bash script that compress all folders in a specific folderThe script also:- add a password to the compressed files- delete the original folder after compressionSuppose that this script is called "rar.sh".At some particular moment, there will not have any folder in the specific folder since they have all been compressed.I want something (a script?) that will check (every minute approximately) if there's new folder in the specific folder.If there's new folder, then execute script rar.shor if there's not new folder, then re-scan in the next minute.
View 2 Replies
View Related
Aug 26, 2010
Does anyone know the command line option to show rhythmbox?
Basically I just want to make a shortcut to show the rhythmbox screen as opposed to clicking the icon and selecting show rhythmbox
rhythmbox-client --(option) --no-start
View 9 Replies
View Related
May 6, 2011
Howto show all services running/installed in the command line under Centos 5.6 Server?
View 6 Replies
View Related
Oct 6, 2010
i need to write a short script that will compress a specific folder that`s on the Desktop (and all it`s content) and also will encrypt it with a password that is inside the script --->meaning it wont ask for a password+verification when compressing+encrypting
View 1 Replies
View Related
Feb 24, 2011
I'd like show a certain line or lines of a file with context, kind of like a unified diff, on the command line in Linux:
$ (something) -l 154 stuff.py
150: def foo(bar):
151: """
[code]....
View 5 Replies
View Related
Aug 22, 2011
How can I print Linux command line history without including the line numbers? I want to send it all to a text file like this:history >> history.txt
View 1 Replies
View Related
May 29, 2010
i've gotten my fedora 12 to the point where i can run python3 scripts from command line and can call up python 2.6.2 idle with the command 'idle' from command line. what command will call up python3 (3.1.2 to be exact) idle?
View 5 Replies
View Related
Apr 1, 2010
Yesterday after downloading a file I tried to find it on the desktop where downloaded files are saved. It does not appear in nautilus but when I look for it from command line it appears to be there. I simply do 'ls' for this and that means its not hidden.Googled it for an hour to find a suitable answer but most of the posts focus on removing the in front of file name which is not the case here.
View 13 Replies
View Related
Oct 21, 2010
My folder have some files and I want to show the number of files on folder at "Total file on folder: " Ex: Monday folder have six files and it will show "Total file on folder : 6" when I run a script. This is my code :
#!/bin/sh
if [ -d /home/kenzo/Monday/ ] && {
echo "Monday"
ls -l /home/kenzo/Monday/
[code].....
View 2 Replies
View Related
Jan 5, 2011
I was laughing about klackenfus's post with the ancient RH install, and then work has me dig up an old server that has been out of use for some time. It has some proprietary binaries installed that intentionally tries to hide files to prevent copying (and we are no longer paying for support or have install binaries), so a clean install is not preferable.
Basically it has been out of commission for so long, that the apt-get upgrade DL is larger than the /var partition (apt caches to /var/cache/apt/archives).
I can upgrade the bigger packages manually until I get under the threshold, but then I learn nothing new. So I'm curious if I can redirect the cache of apt to a specified folder either on the command line or via a config setting?
View 2 Replies
View Related
Mar 26, 2011
I know my way around MS Windows much better, but I just don't feel right trying to program something for Android on a Microsoft operating system. I am interested in Android programming so I followed the instructions on [URL] to install the environment on my computer...
I just installed the JDK, SDK, Eclipse successfully (or I assume):
* When I get to Step 4 where I'm supposed to run 'android' it will not run. I get the error message "android: command not found" (I am definitely in the right directory).
** When I double-click it in nautilus, it opens up in gedit. I can set the permissions in nautilus (through the properties - Allow executing file as a program) and get it to work,
My system:
Intel i7
Ubuntu 10.10 Maverick Meerkat
android-sdk-linux-x86
eclipse 3.6.2
View 5 Replies
View Related
Apr 30, 2011
I installed the Berkeley DB on the Ubuntu server and tried to access the dbxml from the command line and it returns command not found
path/to/dir/dbxml-2.5.16/install/bin$dbxml
-bash" dbxml: command not found
Can someone point me in the right direction
View 1 Replies
View Related
Aug 8, 2011
Whenever I go inside a directory in Linux, it shows the file path at prompt like:
root@vivek-HP-Pavilion-dv6-Notebook-PC:/var/www/abc/def/
How can I change it to show short names instead?
View 1 Replies
View Related
Feb 21, 2011
I have downloaded the backtrack 4 r2 but when I started it, it didn't show me the line to enter the user name and the password
View 5 Replies
View Related
Feb 2, 2011
can i use one samba share with a folder showing the contents of another directory.shortcuts don't work on non ubuntu systems and it won't resolve links to files no on the share
View 5 Replies
View Related
Jul 29, 2011
I create a bash script and I assign a folder variable like:
#!/bin/bash
....
Myvariable_FOLDER_PATH=/PATH/TO/SPECIFIC/SUBFOLDER
is there any way to make another variable with just the specific SUBFOLDER
(?some command?)----> will make My_variable_subfolder = SUBFOLDER
so if I do
echo $Myvariable_FOLDER_PATH
i get: /PATH/TO/SPECIFIC/SUBFOLDER
and echo $My_variable_subfolder
i get: /SUBFOLDER
The tree and path names will change so I jjust want the last subfolder that I will access to access its files.
View 3 Replies
View Related
Mar 21, 2011
why I cannot upload local files to subfolder in my home folder on FTP server? Say, i wanna upload files to /home/haolh/trial/occ/src/occ, but following error msg were given...
commandput "C:Proj rialoccsrcocc" "occ"
error/home/haolh/trial/occ/src/occ: open for write: permission denied
After google this prob, i've tried commands as below but it still failed
chmod 770 /home/haolh/
chown root:haolh /home/haolh/
View 2 Replies
View Related
Jun 24, 2011
how do you write the ASCII character #27 in the vim command line?
View 6 Replies
View Related
Sep 29, 2010
I want my bash script to run scripts located on a different folder. If it is also located on the same folder with my script, it will go like this:
on my $HOME folder: (this_script.sh, backup.sh, restore.sh, purge.sh)
#!/bin/bash
./backup.sh
./restore.sh
./purge.sh
But what if, on my $HOME folder: (this_script.sh)
$HOME/scripts folder: ( backup.sh,restore.sh, purge.sh )
Below doesn't work...
#!/bin/bash
./$HOME/scripts/backup.sh
View 5 Replies
View Related
Jul 13, 2010
I was wondering, i have a webfolder and have permissions set to 770 with group being www-data. I would like to give access to one folder to a friend so he can edit images, css, etc. I made that folder 770 with group being site_name with www-data and him being in the group. So far so good it sounds like. However when i use the full path to the directory linux says it doesnt exist.
Is there a way i can make it so he doesnt have r/w file on files inside the parent directories and still access the directory i want to give him?
View 1 Replies
View Related
Dec 9, 2010
I am attempting to use the zip command with the '-x' option to exclude a folder e.g. 'zip upload.zip public_html -x public_html/jquery/*'. However, parts of this folder are still being added to the archive. I made a shell script (saved as 'compress.sh' and ran as '. compress.sh') to do the archiving so I could test adding nested wildards for multiple subfolder levels.
Code:
#!/bin/bash
rm -f upload.zip
zip -r upload.zip public_html
-x public_html/jquery
[code]....
Each new line I added here that has the nested wildcards made the archive file size a bit smaller. Adding more /*'s than this didn't affect the file size. Even after all this though, there were still a couple megabytes of files and folders from the 'jquery' directory that were added to the archive.
Here's some examples of files and folders that were created after I unzipped the archive:
public_html/jquery/js/tablesorter/addons/pager/icons [folder]
public_html/jquery/js/tablesorter/addons/pager/.svn/entries [file]
public_html/jquery/js/tablesorter/build/.svn/text-base/js.jar.svn-base [file]
Why is it that despite all the -x lines, the files and folders like these were still being added to the archive? How can I simply recursively exclude the entire public_html/jquery folder from the archive?
View 4 Replies
View Related