Does anyone know of a decent Operating System CLI cross reference website where I can compare diffent CLI commands against others? For example I have a MAC OS 10.6X running Darwin and I needed to know what the equivalent command using CentOS of rusers would be? It would be users running that same command at the MAC cli.
I have a requirement to list files using find command My folder contains below list of files with out extention.I have a requirement to exclude only ABC.123.* type files and list others. Even though files having MNO contains this pattern i should not exclude. Even if file ends with .txt or .doc it should not be excluded. That is ABC.123.1234.txt should not be excluded.But I am not getting what is required. Can any one please let me know if I am doing wrong any where. As per my requirement I cannot use grep, -regex, or -regex attributes to find command.
I have a file with joker character patterns: ./include/* ./src/* etc. From the current directory I would like to recursively get the list of files that do not match these patterns.
I have 2 massive duplicate dirs of the same format as below: dir1 subdir1 file1 subdir2 file1 subdir3 file1 ...
Dir2 is the same, but it has some newer files of the same name. I want to copy all file1's from Dir2 to the same name and folders in dir1. So basically something like: cp -pr bkpDir1/*/*-big.gif Dir2/*/*-big.gif
This works for singular cases: cp -pr bkpDir1/uniquesubdir/*-big.gif Dir2/uniquesubdir/*-big.gif
But not for wildcards: cp -pr bkpDir1/subdir*/*-big.gif Dir2/subdir*/*-big.gif
Anyway the aim is to do the first cp above, I have tried a few options using find. In trying to show an example stumbled upon a way that worked, while in dir2: find */*-big.gif | xargs -i cp -rp {} ../dir1/{} Sure there are better ways also...
I am writing a shell script that finds all files named <myFile> in a directory <dir> or any of its subdirectories, recursively. I also need to take care of symbolic links that may form cycles, to avoid infinite loops. I am not supposed to use find command for the same
I started writing the code but got stuck. I thought using recursion may be a smart way, but its not working.
What is the best and simplest way to compare two directory structures without actually comparing the data in files. This works fine: diff -qr dir1 dir2 But it's really slow because it's comparing files too. Is there a switch for diff or another simple cli tool to do this?
From this directory, I want to know how I could use grep to display files based on part of their filename - for example those starting with "Account" or those ending in ".sh".
I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:
I have two table files with x (1st column) ,y (2nd column) coordinates and intensity (3rd column). I need to match these two tables and divide the intensities at the consecutive coordinates on the 3rd column. The problem is the size of the tables are not same and I want to ignore the lines if they are not in one of the other file.
Is there a way, preferably in python or BASH, to rename files from a list? for instance, track1.mp3, track2.mp3 should be renamed to the names stored in a file listing song names. I have tried to loop a variable through directory listing and renamed them, only to find that filenames with spaces can't be assigned to a variable as a whole. To solve the problem above, I have tried the read command in BASH, which enables the program reading line by line from a list. However, It was failed to pipe the results from directory listing to the read command.
I've been hitting my head against a wall for awhile with this one:As the last part of some data analysis I performing I would to construct a matrix from a series of different files. These files have the format:
certain there is command line magic that will enable me touse find to identify a set of files use tar to create an archive of all matching files I get find to create a list of files that I really want, but I'm dashed if I can discover how to tell tar to roll-up all of those files.
If I use find's -exec option, it runs tar for each filename. Telling tar that input is $(find ...) results in a command line that is correct but too long. I think that I want to tell tar to read the list of files from STDIN, but I cannot discover how to do that if it is possible. I thought that the option "--" double-dash but having that right-most on the tar command did not work.
I'm sure most of you know that making a file or folder hidden is simple in the Linux world: Add a period (.) before the name. However, if you were to save such a file or directory to a flash drive, it would only be hidden on Linux systems. If you plug the flash drive into a Windows machine, Windows will happily show the file.Is there a way to make cross-platform hidden files?
I have created a simple test class - Mortgage, with the class declaration in the .h file and the class's methods defined in the .cpp file. (mortgage.h && mortgage.cpp, respectively) Straight up C++ 101 as far as I can tell. I instantiate the class in the main() function, which is defined in practice.cpp. Using Geany on Ubuntu, both the practice.o and mortgage.o files are created, but then I get a linker error: undefined reference to class::functionName
I get it for each function. If the mortgage.cpp file is foremost in the editor when I click "build", then I get the undefined reference to main() error, if practice.cpp is foremost (where the main() function is) then I get undefined reference to Mortgage::Mortgage(), and all the rest of the functions defined for that class. How do I get the linker to know where my object files are so it will link them in? Or is the problem somewhere else entirely?
this awk statement only returns the first line, and i cant seems to make it perform in a way to match based on keywords like GREP. Is there any way to make display the other lines which contains "google" also?
I am running Linux and I have some basic console knowledge but my current problem is quite difficult and I dont know how to achieve this. I want/need to rename everything within a folder that matches a given string.
By everything I mean: folders/files content within a file content in hidden files
Basically I want to refactor a Java-project. Sure, I could use Eclipse to handle the replacing, but this leaves out the folders or resources outside of my workspace. I was thinking of a script that could do the job for me but this seems rather tricky. For instance when it comes to folder-/file-rename I want to replace only the part of the name that matches my string, the rest should remain untouched.
I had debian squeeze already installed, then installed win 7. Windows overwrote by MBR, as I expected it to, so I used an ubuntu live cd to reinstall grub2 to debian root.
I rebooted, and sure enough I had grub back. The boot menu has debian on it. Just debian (crunchbang actually, but its the same thing).
So I added a script in /etc/grub.d (called Windows_11) to create a windows chainloader entry in grub.cfg, and ran update-grub.
Update-grub picks up my /etc/grub.d/Windows_11 script, and adds an appropriate chainloader entry to /boot/grub/grub.cfg.
So I would expect this new chainloader entry to show up in my boot menu when I boot up. But it doesn't; on booting I only have the option to select debian.
Here is my /boot/grub/grub.cfg -
Code: ### BEGIN /etc/grub.d/10_linux ### menuentry 'CrunchBang Linux, with Linux 2.6.32-5-686' --class crunchbang --class gnu-linux --class gnu --class os { insmod part_msdos
I am getting the bellow linker error with GCC 4.4 and GLIBC 2.12.
1. /usr/lib/../lib64/crt1.o: In function `_start': (.text+0x12): undefined reference to `__libc_csu_fini' 2. /usr/lib/../lib64/crt1.o: In function `_start': (.text+0x19): undefined reference to `__libc_csu_init'
I get this error : debug/libns3.so: undefined reference to `SHA256_Update' debug/libns3.so: undefined reference to `SHA256_Final' debug/libns3.so: undefined reference to `SHA256_Init' collect2: ld returned 1 exit status
I want to list all the files that don't have a copy with the same filename with -1 somewhere in it. So, in the example above, the results would be 3.png.
NB: the file and its copy with "-1" in it will be the same filesize, if that helps.
While saving a file I made a typo and performed the vi command ':w~' instead of ':w!' and I created a root '~' instance in one of my subdirectories. How do I remove this reference without wiping out the entire main /root /~ directory? Do I use unlink()?